There's an electronic gadget I bought from Smarthome.com that works great I found out for taking care of my back-door neighbor's dog. It's an ultrasonic speaker with a microphone. The gadget is tuned to the frequency of the dog's bark. When the dog barks, it emits an ultrasonic sound that annoys the dog. I put it on the back of my shed facing the neighbor's back yard. The box is very discreet, and I don't think they notice it, or if they did, probably think it's for a security system. At first, it made the dog bark more, but after the dog figured out that barking creates the discomfort, it was only about a week or so before he was "trained" not to bark anymore in the back yard!
The dog has shut up quite nicely, and this was an annoying dog that would bark at anything! The dog is really friendly, and so is the old lady that owns the dog, so I didn't want to hurt the dog, or annoy her. She has mentioned to me a few times "I'm glad coal(the dog's name) has finally learned not to bark so much...I tried everything to keep him quiet, and never could" If he does find the compelling need to bark, I noticed that he usually runs into the front yard to make his noise...away from my yard!!! Like I said, the dog is really friendly, and hasn't met a human or creature he didn't like, and most of the barking was because he wanted to come out and play with whomever was nearby.