מַה טֹּבוּ אֹּהָּלֶיךָ יַעֲקֹּב מִשְּכְּּנֹּתֶיךָ יִשְּרָּאֵל How goodly are your tents, O Yaakov, your dwelling places, O Israel! [Bamidbar 24:5]
The Sifsei Kohen (the classic commentator on the Shulchan Aruch) writes in his commentaries on the Siddur that in this verse (see above), the אוהל (tent) is one’s personal home and the משכן (dwelling place) is one’s shul. Why does the Torah place “the tent” first, asks the Sifsei Kohen? He answers that this is based on the teaching of Chaza”l: “If your friend is habitual in greeting you with “Shalom”, you should greet him with “Shalom” first.”
Based on this, says the Sifsei Kohen, when a Jew is accustomed “to greet” HaKadosh Boruch - i.e., being diligent in coming to shul for prayer and Torah study, Hashem greets that person with Shalom (in his home) first. It appears then that based on this explanation, the verse is saying: “You leave the door of your house to go to shul in the morning - as part of your diligence to tefilla in shul, and before you reach “Hashem’s home”, He blesses your home.”
