Yes, electricity takes all paths, it's just that most of it flows through the one of least resistance.
A complete circuit is required for electricity to flow. In the case of the mains, the neutral side of it is connected to ground, so a person can receive a shock by touching the phase, if another part of their body is touching ground. If an isolation transformer, with a floating secondary is connected to the main, the person won't be shocked if the only touch one side of the secondary, because there isn't a complete circuit.
Now you might ask, why is the mains earthed, if it increase the risk of a shock? The answer is it's done to prevent the mains from floating at a much higher voltage, with respect to earth, in case of a lightning strike, or a higher voltage conductor comming into contact with the mains.