The circuit for the fridge alarm
is shown in Fig. 1. It's a basic light-activated switch that activates a piezo tone generator. When cadmium sulfide photoresistor R1 is dark, its resistance is very high and NPN switching transistor Q1 is off. When light strikes the sensitive surface of R1, its resistance falls significantly. This causes the voltage divider formed by R1 and R2 to apply sufficient bias to Q1's base to switch Q1 on. This allows current to flow through Q1 to PZ, a piezoelectric buzzer.