If the store will close and one has not yet Davened what is he to do?
If one has not yet recited the Shacharis prayer and will be unable to purchase his Shabbos needs after completing his prayer, then he is to first say Shema within its proper time [if applicable] and then purchase his Shabbos needs, delaying his prayer until after the purchase. This applies even if it is possible that due to the purchase he will miss praying within Zman Tefila, nevertheless he is to first make his purchase. If, however, delaying the prayer until after his shopping will cause one to fail to pray with a Minyan, then he is to first pray [see footnote]. [Likewise, if doing the purchase will definitely cause him to fail to pray within Zman Tefila then he is to first pray.]
 Admur 250:3
 The reason: He must say the Shema prior to shopping even if there may be time left to say it after shopping, as we suspect that perhaps it’s time will pass prior to him finishing shopping. [ibid]
 But not definite, as will be explained.
 The reason: We do not suspect that one will come to pass the time for Davening [which is the 4th hour of the day], as we do by Shema, as Davening contains one more hour then does the Shema. Now, although there is room to suspect that this time will too pass until the shopping is complete, nevertheless since the Mitzvah of preparing for the Shabbos meals will definitely be not fulfilled if one Davens first, due to the closing of the stores, while it is possible that he still be able to Daven on time if he go to the store first, therefore he is to first go to the store. [ibid]
 Admur ibid writes that one is to first purchase his groceries and then pray even if there is doubt that he may not be able to pray within Zman Tefila due to this. Nevertheless “if the congregation is praying, he is not to separate himself from the congregation.” This implies that if one will miss the Minyan due to the shopping he is to first Daven and then shop.
Other Opinions-Mishneh Berurah: The Mishneh Berurah [250 Biur Halacha “Yashkim”] questions how could the Rabbinical Mitzvah of Davening with a Minyan push off the Mitzvah and obligation to prepare for the Shabbos meal, which is a Biblical command of Oneg Shabbos. Furthermore, even if Oneg Shabbos is only of Rabbinical origin, since one can Daven in private how can we allow Davening with a Minyan to completely nullify the Mitzvah of Oneg Shabbos. He thus concludes that one is to first go shopping, even on expense of missing the Minyan, and then Daven in private.
Opinion of Ketzos Hashulchan: The Ketzos Hashulchan [70 footnote 11] suggests that in truth everyone agrees that Davening with a Minyan alone is not enough to nullify the Mitzvah of Oneg Shabbos, and one is to thus first go shopping in such a case. When, however, do we say that Davening takes precedence? In a case that in addition to one losing out in praying with a Minyan, there is also possibility that if he shops before Davening, he will miss Zman Tefila, and in such a case that there are possibly two transgressions involved in first going shopping, one is to forgo the shopping and first pray. However, if one knows for certain that he will not miss Zman Tefila then he is to first go shopping, even on expense of missing the Minyan. [This opinion of the Ketzos Hashulchan does not contradict the ruling of Admur or the ruling written above, as whenever one goes shopping in the morning there seemingly is doubt, he will lose Davening within Zman Tefila, as there is no prediction of how long the shopping will take.]
Vetzaruch Iyun on the above distinction of the Ketzos Hashulchan, as Admur in 90:17 rules that the Mitzvah of Davening with a Minyan which contains the greatest positive command of sanctifying Hashem’s name in public, pushes off even a negative command of not freeing a slave. [This is in contrast to other Poskim, such as Michaber Yoreh Deah 267:79 who do not view any special advantage in Davening with a Minyan regarding pushing off this negative command, and rather rule that all Rabbinical Mitzvos may push off this command of not freeing a slave.] Thus certainly in our case that a) there is a dispute if Oneg Shabbos is Biblical or Rabbinical, and b) It is possible for one to eat at someone else’s house or borrow food, which Davening with a Minyan would push off shopping, even on expense of Oneg Shabbos.
However perhaps one can differentiate between the Halacha here and in 90:17, as perhaps only in a scenario that there will not be a Minyan at all do we say that making a Minyan overrides even a Biblical command. However, if there will be a Minyan regardless of if one joins this Minyan, then Davening with a Minyan does not override even a Rabbinical command. This distinction can also be proven from the law that one may not delay praying within Zman Tefila even if he needs to use the bathroom, if he can withhold himself for a Shiur Parsa. However, one is to delay praying with a Minyan if he has to use the bathroom even if he can withhold himself for Shiur Parsa. Likewise, the law states that if Zman Tefila is passing he is to begin Davening Shemoneh Esrei before the Minyan even though he will miss Davening with the Minyan due to this.
In any event one can deduce from here that if one is the 10th man for a Minyan he may not leave the Minyan and go shopping even if the store will be closing, and even if he will be able to Daven later, after shopping, within Zman Tefila.
 So is implied from Admur and so rules Ketzos Hashulchan 70:5