One of my friends has this setup.
Dog gets within 1m of fence line .... collar gives a warning beep
Dog crosses fence line .... it gets a zap
It only takes a couple of zaps for the dog to learn and then it will not go near the fence
You cannot coax the dog to do it without the collar either