PN-junction diode works as a insulator, if connected :
In reverse bias no current flows.
The reverse biasing in a PN junction diode
When a PN junction diode is reverse biased