333. Not Using a Shul as a Shortcut

Tefillah u’Birkas Kohanim 11:8

If a shul or a study hall has two entrances, one may not use it as a shortcut, entering through one door and leaving through the other. This is because we are only permitted to enter these places for the purposes of a mitzvah.

Tefillah u’Birkas Kohanim 11:9

If one must enter a shul to retrieve a child or his friend, he should go in and recite a Biblical verse or a mishna and then go get that person. In this way, he did not go into the shul strictly for his own use. If he does not know how to do this, he should ask one of the children there to tell him the verse they are studying. Otherwise, he should wait a little while in the shul before leaving since spending time in shul is part of the mitzvah as per Psalms 84:5, “Happy are those who dwell in Your house.”