IMHO - underground fences are useless.
While they MIGHT (and I do mean might) keep your dog in the yard, it will not keep anything out of your yard that might harm your dog. And if your dog has any kind of prey drive - the lure of a squirrel might just be more then he/she can handle and out of the yard he/she goes, ignoring that momentary zap. She is much less likely to ignore that zap to get back into the yard.
I would fence in an area for him/her to use when you are not going to be able to keep a close eye on him/her while you are out and the pup can have supervised freedom (once it has learned some basic commands) when you can watch.