The interior light in most refrigerators, and the fan in some, is controlled by a door switch. Locate the switch and remove it by removing the retaining screw (if any) or by prying it with a putty knife. Place a piece of masking tape over the blade of the putty knife to prevent damage to the refrigerator. Gently pull the switch from its housing and expose an inch or two of wire.
Before replacing the switch, unplug the refrigerator to avoid an electrical shock hazard.
The switch will be connected by two wires (four wires if it also controls the fan). Label the wire placement on the switch before disconnecting the wires. The wires are connected to the switch with slip on connectors. Firmly pull the connectors off of the switch terminals (do not pull on the wire). You may need to use a pair of needle-nose pliers to remove the connectors. Inspect the connectors and the terminals for corrosion. If the connectors are corroded they should be replaced.