Question: When one strolls through one’s garden on Shabbat, may one think about the fact that one must tend to the garden on Motza’ei Shabbat? Likewise, may one look into shop windows on Shabbat?
Answer: The Gemara in Masechet Shabbat (113a) derives from the verse in Yeshaya (Chapter 58) which states, “If you shall halt your feet because of the Shabbat, (and abstain) from performing your activities on My holy day,” that one may not perform one’s regular activities on Shabbat, such as walking up and down one’s field in order to ascertain what needs to be done to it the next day. Maran Ha’Shulchan Aruch (Chapter 306) and all Poskim rule likewise.
The Rambam (Chapter 24 of Hilchot Shabbat) writes: “One may not check one’s gardens or fields on Shabbat in order to ascertain what needs to be done to them.” The source of this law stems from the aforementioned Gemara. We derive from the words “performing your activities” that even an activity which entails no forbidden work is prohibited on Shabbat if it is a regular, weekday activity.
Maran Rabbeinu Ovadia Yosef zt”l writes (in his Chazon Ovadia-Shabbat, Volume 6) that the Gemara (Eruvin 39a) states that this is only prohibited when it is noticeable that one is going specifically in order to see what the field needs, i.e. by going there and staring at it intently.
However, if it is unnoticeable that this is one’s intention, for instance, if one is merely strolling through one’s garden, there is no prohibition to look and see what it needs after Shabbat.
Although the Chayei Adam and other Poskim rule stringently on this matter even when it is unnoticeable that this is one’s intention, nevertheless, the Mishnah Berura (Chapter 306) writes lengthily to prove that the Halacha follows the more lenient approach.
Thus, regarding our question which discusses a private garden in one’s home where one happens to be taking a stroll, there is no prohibition in pondering what in the garden must be tended to after Shabbat.
Based on the above, if one is strolling on the street on Shabbat, one may look at stores as one is walking in order to know which stores to visit after Shabbat. Similarly, one may look at the items displayed in the storefront as one is walking, as long as one does not focus on the prices.