Need help for identifying components
If you mean that round white thing- that's an interesting question. I'm guessing it might be an ultrasonic (or maybe high frequency sonic) piezo element that resonates with the black cylindrical drum-wound autotransformer or inductor or tapped inductor (some inductors have an extra leg for support that is non-functional electrically). 

The inductor looks like a ferrite bobbin wound with wire, but it's got a length of black shrink-wrap tubing over it to protect the windings. 

Here's a typical inductor of this type: 


Then you'd only need perhaps a single cheap transistor and maybe a resistor to generate the 'joke' electrical shocks.