The basic principle: 12volts from the light goes through the buzzer and diode, 12v will be present at the door switch until the door is opened and then the 12v supply is grounded to earth creating a path through the buzzer. The diode stops unwanted volts traveling the wrong way onto the lighting circuit.
The 12v can be taken from the rear of the lights switch and the other end onto the back of the door switch.
Hope this helps!
