If one did not remove or disable the light bulb of a refrigerator before Shabbat, he may not open or close the door on Shabbat, as this will turn the light on or off. If one needs the food in the refrigerator for Shabbat, he may seek the help of a nearby non-Jew. In order to avoid the prohibition of benefiting from a melakha performed by a non-Jew, one should offer him food from the refrigerator, at which point he will open the door for his own benefit. Once the non-Jew has opened the refrigerator for himself, the Jew may take whatever he needs out of the refrigerator as well. Although generally one may not ask a non-Jew to perform a melakha on Shabbat, here one is not asking him to perform a melakha. Rather, one is asking him to open the refrigerator, which also happens to turn on the light. Afterward, in order to continue opening and closing the refrigerator permissibly, one may ask the non-Jew to remove the bulb, because turning off electric lights is only prohibited rabbinically, and one may ask a non-Jew to transgress a rabbinic prohibition for the sake of Shabbat (above 9:11; below 25:2, 5).
If no non-Jew is available, and the food is truly needed, then when the compressor has cycled off, the refrigerator may be unplugged using a shinui, such as by prying the plug out of the socket using a thin piece of wood or plastic. Since the plug is muktzeh, it may not be moved in the normal fashion (below 23:14).
In a case where one is uncertain whether or not the bulb was removed, many poskim maintain that one may open the refrigerator. First, he does not intend to turn on the light, but only to open the refrigerator. If the light does go on, it is a case of psik reisha – he is performing a permitted action, and a second prohibited action takes place collaterally – which is normally prohibited. However, since the prohibited action might not occur, this is a case of an uncertain (safek) psik reisha, which is not prohibited. Although some are stringent in such cases, the lenient position is the primary one.
If the refrigerator was opened and the light went on, food that is needed may be removed. The refrigerator should not be closed. Rather, a towel or some other object should be positioned in a way that prevents the refrigerator from closing and turning off the light. This way, the refrigerator can also be reopened.
. SSK 10:14 permits one to pull the plug using a shinui, but only if it often plugged and unplugged. If this is not the case, he is concerned that unplugging it might qualify as Soter. In 15:3 above I write that even if a particular appliance is not plugged and unplugged regularly, the law follows the majority of plugs (which are plugged and unplugged regularly), and we do not distinguish between types of plug. Therefore, there is no problem of Boneh or Soter. Menuĥat Ahava 1:24:20 is not concerned about this and allows one to remove the plug with a shinui. In any case, as long as a shinui is used, then even concerns of Boneh and Soter amount to a doubt about a rabbinic law, and when necessary one may be lenient. However, it is still forbidden to plug the appliance back in. See Harĥavot for what to do in a case of dire necessity.Nowadays, most refrigerators have near-constant electrical activity, and pulling the plug puts an immediately stop to this activity, resulting in an act of Mekhabeh. Nevertheless, as long as one pulls the plug with a shinui, since the prohibition of turning off electricity is rabbinic, it is a shvut di-shvut, which is permitted for the sake of a mitzva, as explained above in 9:11.
Asking a minor: In cases of necessity, when the food is needed to feed a minor, one may ask the child to open the refrigerator. Since he has no intention of turning the light on, his act of opening the door is only prohibited rabbinically, and several Rishonim maintain that one may instruct a minor to transgress a rabbinic prohibition for his own needs. Some extend this leniency to cases of great need, and when necessary one may rely on them, as explained below 24:5 and in Harĥavot here.
. The status of a safek psik reisha is subject to dispute. Taz permits it, while R. Akiva Eger forbids it. The poskim tend to be lenient in times of necessity, especially when it is a psik reisha de-lo niĥa lei, in which case it is a case of doubt about a rabbinic law, as explained in BHL 316:3 s.v. “ve-lakhen.” SSK 10:15 applies this rule to the case of a refrigerator, as does Menuĥat Ahava 1:24:20. See above, 9:5 and n. 2 and Harĥavot 9:5:8. If the refrigerator has been opened and the light is already on, and one is desperate to close the refrigerator door so that the food will not spoil, he should push the door in the opposite direction and then let it swing shut on its own. This way it is closed via grama. As San. 77b explains, if one throws a rock upward, and it then falls straight down, such an action is considered grama )Orĥot Shabbat ch. 29 n. 38).