My friends invited me to dinner.

Literal

Friends [topic-は] me [object-を] dinner [to-に] invited [for me-くれた].

招待する is the formal verb for 'to invite' (as opposed to the more casual 誘う). Combined with ~てくれた, it frames the invitation as a kindness received by the speaker.