@Yetanotheruser, it uses multiple methods. Flags so they get a visual signal they’re too close to the fence. We left ours around the garden for a long time. A sound. So they hear a beeping noise when they get close to the fence. And finally, yes their collar gives them a shock. However, ours are set to the lowest level and our dogs know as soon as they hear the beep they shouldn’t go closer to the fence. Before we bought it, my husband wore the collar to test how scary the zap was. I asked him to describe it and he said “Will only hurt the dog if it’s on high and the dog gets caught in between the electric fence and say a solid fence. Wouldn’t cause physical damage but stress”. The shock at low levels is more of an ‘ouch, I don’t like that’ rather than ‘aaagh! make it stop’ sort of thing. We didn’t want our dogs hurt or terrified (which they aren’t). We just don’t want them run over by a car.
You do still need a traditional fence (imo). We have a section of fence we can remove when we’re gardening and need to get a trailer in the backyard. Go-go gadget legs knows if there is a break in the fence and she really wants to pass, she can run at the gap and she’ll get through without the zap. She might do this if say my husband (who she loves) is on the other side of the wire (which is buried under the ground). However, if there is a fence there that acts as an additional barrier, she knows she won’t be able to avoid the zap and she won’t make the attempt.