Q. Someone forgot to remove the light bulb from the refrigerator before Shabbos. If it is not possible to get food from a neighbor or from somewhere else. Is it better to open the door with a shinui, or take money and go to the store and buy food (in a place where there is an eruv)?
A. If there is enough food outside the fridge to eat a simple seuda, such as chalos, hot soup, cholent, etc. that should suffice, and the fridge should not be opened.
Horav Shlomo Miller's Shlit'a opinion is that a Gentile should be asked to open that door, if truly needed, such as for having milk for young children. If no Gentile is available, one may ask a child who is unaware of the fridge light, to take out something out of the fridge, and then one should keep it slightly open for the rest of Shabbos.
Buying in a store involves a number of prohibitions besides ma'aras ayin and chilul Hashem.
Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit'a