Before condemning in ground fencing as always cruel I think you must consider that the answer is, as always, it depends. I wouldn't advocate that anyone just installs it - it doesn't suit careless or inexperienced dog owners.
If there are circumstances where no other method of containment is suitable then it can work well. Training is crucial and can take weeks if not months.
It's not a question of the dog or dogs walking up to the fence and getting zapped willy nilly. Someone mentioned up thread about the white flags. These are the first visual clue. As the animal passes beyond the white flags into the boundary area, there is both an audible buzzing activated on the collar, coupled with a vibration. These increase in intensity as the dog approaches the critical zone. It is then and only then that the dog receives a shock which in itself is adjustable depending on the size and temperament of the dog.
I have used these boundary fences for 10 years now on a variety of breeds and have never experienced the behavioural problems or anxieties that I've heard mentioned. The most shocks that my dogs have received is one (or in the case of a particularly dozy GR, two). This is because I have always trained them, slowly and meticulously where the boundaries are and how to recognise them. They are calm and relaxed and have never bolted through, whatever the provocation.
The reason that I use the in ground system is because we live in a large property in a very rural area, prime sheep and rabbit country. We have a busy yard with the horses etc and although I have no worries about my dogs lack of recall etc, there are occasions where delivery drivers, farriers, kids etc can leave a gate open and I can't risk my animals being unsupervised around livestock or getting under wheels. My dogs are always out and about with me but, with the fence in situ I can relax without the worry of them sneaking off when my back is turned.
I would add that they are collar trained; they know instantly when the collars are removed that it's safe for us to leave to go for their walk.
As I said I am not advocating this system but just wanted to say don't condemn it out of hand. In certain circumstance, if introduced with great care and attention then it can work well.