I don't like the electric fences. If a dog is determined they will just put their head down and run through the fence. Then when they do come home they are not as committed to getting back in the yard.
I've seen them work on some dogs but more often than not I've seen dogs run through them. I did see one owner put the collar on a longer strap and strap the electrodes to the underside of the dog like a flank strap on a bull. That stopped him pretty good.
I don't fully agree that all dogs can be trained out of the "running" issue. Some breeds are more prone to this but it doesn't mean they will run. Best thing you can do (short of spending a ton of money on training) is work on the respect thing in the house so he's not shooting out the door when it opens (my dogs would get a big ol' stop if headed for the door and it wouldn't feel good) and keep him on a leash when you were outside. The training tips on here are very good but they will take a lot of time and consistency on your part.