Reconnect the wires to the terminals of the replacement door switch. Slip the wiring and switch into the opening in the refrigerator and snap (or screw) the switch back into place.
Plug in the refrigerator and test the switch for proper operation. If it still doesn't
work try testing the new switch, replacing the light bulb and testing the switch circuit for power with a multimeter.