In order to prevent insult, the Chachamim permitted saying “Shalom” in the middle of Keriat Shema and its berachot to a person of exceptional distinction. Therefore, one who is in the middle of reciting Birkot Keriat Shema, or one of the paragraphs of Shema, and sees a person whom he is commanded to revere, such as his father, his rabbi, or a prominent Torah leader of the generation, he may initiate a greeting to him. If he sees a respected person, like a talmid chacham (Torah scholar), a wealthy person, or a person of another status, he may not initiate a greeting. However, if the distinguished person says hello to him, he may respond.
If he is in between passages, meaning between berachot or between paragraphs, the ruling is more lenient. In such a case, one is permitted to initiate an interruption in order to say “Shalom” to a respected person. If he is greeted, he may respond to any person (Shulchan Aruch 66:1; Mishnah Berurah and Kaf HaChaim). In the middle of the verses “Shema Yisrael” and “Baruch Shem” one must not interrupt, unless the situation is life-threatening.
The poskim write that since it is accepted nowadays not to interrupt in the middle of prayer, distinguished people are not insulted when they are not greeted. Therefore, no permission is granted to interrupt in the middle of Keriat Shema and its berachot in order to address a distinguished person or a person who must be revered (Mishnah Berurah 66:2, based on Sefer HaChinuch). However, if someone who does not understand the value of prayer approaches the person praying, and if not answering him will likely cause insult, it is permitted to initiate a greeting to him. Similarly, a ba’al teshuvah, whose parents do not understand the value of his prayer, is permitted to say “Shalom” to them and nothing more.
A person is allowed to interrupt by talking in the middle of Keriat Shema and its berachot in order to prevent himself from bodily harm or monetary loss, although it is preferable, if possible, to finish the paragraph or berachah (see Bei’ur Halachah 66:1 “O”). Likewise, a rabbi who receives an urgent question is allowed to reply between paragraphs and berachot (Aruch HaShulchan 66:4).
One who is reciting Keriat Shema and its berachot should stand if a talmid chacham passes in front of him (Birkei Yosef, Yoreh De’ah 244:1). However, while accepting the yoke of Heaven in the verse “Shema” and “Baruch Shem,” one may not get up. There is an opinion that it is preferable not to stand at all while reciting Shema (Tzitz Eliezer 14:10).
One who sees his friend committing a sin should signal to him in order to stop him. However, if his friend does not take the hint, he must interrupt Keriat Shema and its berachot to tell him to stop transgressing, for if the Chachamim permitted the interruption of Keriat Shema and its berachot for the respect of a human being, all the more so for the respect of Heaven (Ritva, Kaf HaChaim 66:7).
It is not appropriate to collect tzedakah in the middle of Birkot Keriat Shema, so as not to disturb the kavanah of the people praying. Nevertheless, if an honest poor person requests tzedakah, one is permitted to comply (Halichot Shlomo 7:4).