Are you considering a shock collar that you use manually to correct the dog with a remote, or an underground fencing system?
By "wandering off" do you mean that he high-tails it as soon as you take off the leash, running as fast as he can and ignoring your calls to come back, or does he meander around for a bit and then conveniently disappear when you aren't looking, showing back up after a few minutes/hours?
I have not had luck with the remote manual collar, even if you have success modifying behavior when using it, he's probably smart enough to figure out that when you aren't there to shock him, he can get away with the behavior. Try to use this on a run away dog and it will most likely just make him run faster away. However, I have heard of a person that tied their run-away dog to a long line and when they ran away shocked them, then they hit the end of the line, and kept getting shocked until they returned. The key would be to not shock at all as long as the dog was coming to you. They claimed that this method worked for them and that the dog does not run away any more at all. But there is a chance that this will not work, and then you will have a dog that is even worse and be at a loss of $100 or more. I would have to think that some dogs would know when they're not tied and take advantage to run away if the opportunity arose.
I believe that the underground-fence is a suitable option for keeping a meandering dog that slinks out of the yard where they belong. Unfortunately, if the dog does ever learn that once they get past that barrier, they can be free to roam around, then they may decide that the brief shock is worth a couple hours freedom. My neighbor had two dogs that stayed in his yard with the underground fence for about one year. Then, somehow they learned that if they just went ahead and jumped through the "ring of fire", that there was freedom on the other side. For several years not the dogs have visited my yard every morning for a good half-hour to mark all over my property and relieve themselves, and then returning to the sanctity of their invisibly-fenced yard. But your dog might do just fine in a yard like this, just be aware of the possibility that it's effectiveness just might wear out.
No matter which way you go, you're looking at investing alot of either time or money (or both) if you want to modify this behavior. The remote manual shock collar is the most risky of them all, with risks of possible death, physical and emotional damage, and the likely outcome that it just won't work, and the results will be worse than what you started with. Other options would include fencing your yard with an effective real fence and/or hiring a professional dog trainer to help teach you positive behavior modification techniques (for instance NEVER ever reprimand you dog when they do come to you, especially after they run off, no matter how much you want to let them know what a bad dog they've been). If your dog will stay in the yard as long as you are there, then you might have to resort to kenneling or tying on a runner, making sure to let him loose several times a day with supervision. If you are referring to having your dog off-leash away from home, like at the beach or park, etc., then you might simply just have to keep him on leash at these times. You may be able to find places you can go where he can be off-leash and won't get into trouble if he does happen to wander off. You could try something like this: Have a long line, like a 50' laundry line, and tie it to him and keep the end attached to you. Go somewhere where you can have a campfire where you will be alone with no interference. Walk around with your dog, allowing him to go where ever he wants with out any reprimands. Praise him when he is by you, otherwise ignore him and do your thing, walk around. Let him wander off. When your dog has taken off and is doing his own thing ignoring you, then you get your campfire and your hotdogs and start roasting them. Ideally during this time he will get in to trouble, tangled up around a tree or something. Just make sure you can see him and can get to him just in case he needs immediate help. Make sure he can not slip his collar. If your dog is stuck but not in danger, let him stay that way while he smells the yummy meat and sees you there, eating. Sing a happy campsite song. He might start to whine or bark. If he does, acknowledge him. "Hi boy, where you at? Are you stuck? Not very fun, huh?" After a few minutes, casually walk out to him and get him untangled, talk to him matter-of-factly about his situation, pat him on the head and walk back to camp, saying "Come, nameofdoghere" ONCE and only once, firmly. Chances are he's gonna stick by you now. when you get to the fire, give him a hot dog and praise and attention. only give him one. if he goes to meander off again, just let him. Put another dog on the fire, and when it's ready if he hasn't returned yet, whistle once and call his name once. If he comes, reward him with the hot dog. If he doesn't, then retrieve him half by reeling in the long line and half by walking to him, and having him walk with you back to the camp. Sit down, pat him on the head with some praise and give him half the dog and you eat the other half. Repeat this a few times as needed, and just enjoy a couple hours with your dog relaxing and teaching him that there is no better place in the world than as close to you as possible. Exercises similar to this should be repeated often, I imagine it could be done on an even smaller scale, the key element being to create a carefully monitored situation where your dog needs to be rescued by you as a result of their choice to be away from you or be disobedient. Some training exercises to modify your dogs behavior should resist any types of reprimands or commands, simply rewarding any desirable behaviors when the does does them on his own accord. At other times, you might focus on some basic obedience commands with treats and perhaps a clicker. The goal is to become a person that your dog longs to be with because you are a source of affection that good things happen around. I highly recommend finding an activity that your dog enjoys to do with you and do it frequently. Coonhounds are an active breed that need alot of physical and mental stimulation, perhaps agility, search-and-rescue, fetch... you could try the game where you make a set of foot-long 4" diameter PVC tubes with lids and some small air-holes drilled on the sides, stick a feeder mouse (or treat for those that object or can't stomach it) in one of the tubes and hide them around an area inside, on-leash lead him to each one and when your dog identifies the correct one give him the "treat". Once he gets the idea you stand still while he searches the tubes out on his own and bays when he finds the right one, then you go and release his treat. You can then advance this activity to inside-off leash to outside-on leash to finally outside off-leash, which is the goal you're going after, right? What dog owner doesn't long to just be able to enjoy being outdoors with a dog that reliably stays close by and out of trouble? Good luck, I hope this helps!