1) One who enters the synagogue at the moment when the congregation are reciting the Shema, should say the verse “Shema” and “Baruch shem” together with them, so that it does not appear as if he is unwilling to accept the yoke of heaven upon himself together with the congregation. (Shulchan Aruch and Mishne Berurah 65).
2) The same is true if he happens to be in the synagogue when the congregation are reciting the Shema. If he has already commenced “Baruch She’amar”, according to the opinion of the Shulchan Aruch, he should not interrupt and according to the opinion of the Mishne Berurah he should interrupt. From the blessing of Yotzer Or onwards according to all opinions he should not interrupt. Even if he does not interrupt, he should nevertheless say the words of the prayers that he is saying with the tune of the Shema so that it appears that he is reciting with them. (ibid)