There are many solutions out there to stop a dog from barking but almost all of them causing some pain to the dog. Shock collars are one example.
So does something like a shock collar work? I went to a neighbor's house and was greeted at the door by his two miniture poodles. They weren't barking but I noticed they were making a funny whinning/growling low level sound. When I asked if they were ok, I was told that they knew just how much sound they could make before getting shocked. Did it work? Sort of, but they were still making sounds.
There is a collar called a citronella collar that will stop the barking and not harm the dog. It looks similar to a shock collar but the tank is filled with citronella. When the dog barks, a spray of citronella is sprayed in front of their nose. This immediately stops the dog barking! In our house, we rarely have to put it on anymore as a simple "do you want the stinky collar" command stops the barking. We also have found that putting it on the floor in a doorway can act as a majic door that will not be crossed.
You can find citronella collars on Amazon and major pet stores.
Be kind, not mean!