The prohibition on benefiting from a melakha done by a non-Jew on Shabbat is limited to a case where the non-Jew undertook the melakha for the benefit of a Jew. However, if he did the melakha for himself or for another non-Jew, then a Jew may benefit from it. For example, if a non-Jew turned on a light because he wanted to read a book, a Jew may benefit from this light (SA 276:2). Moreover, even if the non-Jew intended to turn on the light for both himself and a Jew, the Jew may benefit from it since in any case the non-Jew needed to turn on the light for himself (Ĥayei Adam; AHS 276:8; BHL 276:2 s.v. “ve-im” is inclined this way as well, in contrast to MA).
Therefore, if the lights went out in a Jew’s home, he may not ask a non-Jewish neighbor to turn on the light, but he may arrange things so that the non-Jew will turn on the light for himself, after which the Jew may benefit from the light. For example, he can invite the non-Jew to come over and eat something. When the non-Jew arrives and sees that the house is dark, he will realize that he should turn on the light. Since the non-Jew is turning the light on for himself, so that he can see the food that is being served, the Jew may benefit from the light as well (AHS 276:9).
Similarly, if a Jew has non-Jewish household help, one may send him to wash dishes in the kitchen even if it is dark there. Upon entering the kitchen, the non-Jew will turn on the light for himself, after which the Jew may benefit from the light. The Jew may even request that the non-Jew leave the light on after finishing his work (MB 276:27; SSK 30:57). However, if a Jew needs to walk somewhere in the dark, he may not ask his non-Jewish domestic worker to come along so that he will turn on a flashlight for himself. In this case, it is clear that the non-Jew is actually doing the melakha for the Jew (SA 276:3).
If a non-Jew heated water for himself on Shabbat and some extra water remained, a Jew may not use it, since the non-Jew may have heated the extra water with him in mind. Even if this was not the case, if the non-Jew sees the Jew using the remaining water, he may decide to add extra water for the Jew on future occasions. However, if the non-Jew does not know the Jew, then the Jew may use the extra water, because there is no concern that the non-Jew added the water for him or will add water for him in the future (SA 325:11; MB ad loc. 66). If a non-Jew picked fruit, caught fish, or milked cows on Shabbat for his own use, a Jew may not eat or drink the products on Shabbat, even if the non-Jew is a stranger. Since these food items were not edible when Shabbat began, they are muktzeh (SA 325:5).
. However, after Shabbat a Jew may benefit from these products immediately, since the non-Jew picked, caught, or milked them for his own use (SA 325:5). According to some, a Jew may not benefit from bread that was baked by a non-Jew on Shabbat, for two reasons. First, it is muktzeh. Second, there is a concern that the Jew will end up requesting that the non-Jew bake for him on Shabbat in the future. Others permit benefiting from the bread, maintaining that since a non-Jew may bake on Shabbat, the bread is not muktzeh. One may rely upon this opinion under pressing circumstances or for the sake of a mitzva (SA 325:4).In 17:9 above, we explain that if one forgot to remove the light bulb in the refrigerator, he may suggest to a non-Jew to take some food for himself from the refrigerator. Even though the light will turn on when the non-Jew opens the refrigerator, the request is permitted because he is not telling the non-Jew explicitly to perform a melakha. Afterward, one may ask the non-Jew to remove the light bulb. Since turning off a light is only rabbinically prohibited, removing the bulb is a shvut di-shvut for the sake of a mitzva, as explained below in section 5.