So your dogs barks. That's what dogs do. They bark. pee and poop. Get used to it.
Hanging a collar on your best friend and zapping him because he does what all dogs do seems to be cruel. Tell you what you should do before you hang one of these devices around your dogs neck. Put it around your own neck and try it.
Best friend??? Does what all dogs do???? Not quite that simple. I don't want to pi$$ with you, but not ALL dogs are the same. I don't think these folks are talking about a dog that might bark on occasion at something that interests him.
I have owned, bred and trained coon and bird dogs for 40 years. Some are calm and easy going and almost never bark in a kennel or enclosure {fenced yard, etc.}. Some see squirrels, cats, etc. and bark at them. Some are slap idiots that start "treeing" a butterfly that flies by and 4 hours later they are still "treed"....this type dog is nervous and high strung and will pace back and forth in the kennel all night and half the next day. This dog is no ones best friend, not until they are taught better.
If handled properly they might make it and become a valuable dog. Most of the time they end up mistreated and passed from one owner to the next until they end up in a pound somewhere. A shock collar can make the difference between success with a dog and a death sentence. The death sentence might not be so bad if it was instant and done with, but again, what I have seen happen time and time again is that this type dog gets bounced around and mistreated way too long first.
Consider a dog running deer. Is it better to train him with a shock collar not to do it, or see some intolerant landowner train him permanently with a rifle????
There is of course an issue of "proper use of the collar". An e-collar is a powerful tool and many "trainers" turn it right up on the highest setting, that IS NOT WHERE YOU START, unless you want to ruin your dog. The better collars today will first tone {an audible ding} which is a warning shot across his bow. Some also vibrate, which is even better because they not only hear it but feel it before delivering the shock. Most dogs do not need to feel pain from the highest setting. No good trainers that I know of will go right to that setting either.