I installed one for my 2 dogs, a black lab and a husky/spaniel mix to keep them out of the road. The lab doesn't go anywhere anyway so training him was easy. The Husky likes to chase wildlife/people/hallucinations so he was harder to train. The fence works, the dog ran through it a few times but he learned his lesson. The lesson is the shock is uncomfortable, it is completely harmless but very uncomfortable. (I tried it) He learned that It is just as uncomfortable to come back home where it's warm and dry as it was to run away to the cold wet woods. After a while both dogs gave up on testing it and they stay in the yard. Even with dead batteries in the collar they go to the invisible fence line and bark but they don't ever go into the road. You have to follow the training directions, it takes a few weeks but if you don't do it then you'll be worrying about your lost dog and then doing the training.
edit: Before I installed the invisible fence I had a remote control shock collar. That worked only when the dog could see me, when I was gone he was gone. I used the Petsafe fence from Walmart, no problems. The training remote was also Petsafe. I left the flags up for a year which really helped the dogs know the boundary. Another thing is Petsafe has excellent customer service, the best I have ever witnessed from a company. I dropped the remote out of my pocket and ran it over with the brushhog, I called and asked where I could get a replacement and they sent me one free.