A fridge goes dark after you close it because most refrigerators have a small switch located on the door frame that activates when the door is closed, effectively turning off the light inside the fridge; essentially, the switch is only engaged when the door is open, causing the light to turn on when you open it and off when you close it