Sahih Muslim, Book 7, Hadith 72 (Muslim 2005)

Jabir b. 'Abdullah said that the Messenger of Allah (ﷺ) delivered the sermon and said:

When any one of you comes for the Friday (prayer) and the Imam comes out (from his apartment), (even then) should observe two rak'ahs (of prayer).