If a person arrives late for Ma’ariv and the community is already up to Shemone Esray, he should pray Shemone Esray with the congregation and afterwards say Krias Shema and the Brachos of Krias Shema. This is because it is more important to daven Shemone Esray with a minyan at night than saying Shema before Shemone Esray. During the morning, though, a person should not change the order. For Shacharis, a person is required to recite Shema before Shemone Esray (even if this means he will miss davening Shemone Esray with a minyan.) Of course, the best thing to do is to show up on time and start at the beginning of Ma’ariv with the community.