I have been a professional dog trainer for 30 years. I have used the Pet-Agree product and it does what it's supposed to do: delivers a high-frequency sound that only dogs can hear (although if you put it up to your own ear you will hear a faint sound).
I think the reason people reviewing this product are saying it doesn't always work, or wears off after a time, is due to the fact that ultrasonic devices ALONE won't solve your problems! (1) You must first determine why the dog is doing what it's doing, and often that will be something in the environment/lifestyle that you need to change; (2) the purpose of the ultrasonic device is merely to INTERRUPT the behavior long enough for you to reward the brief stopping of the behavior and then insert a more appropriate behavior into the "void" you created by using the ultrasound (counterconditioning). To just point the device at your dog and press a button (as if it were some sort of "magic wand") might work sometimes, but it won't get to the root of the problem, and after a while most dogs will start igorning the sound and go on doing whatever they were doing. This is the "lazy way" to try to solve a dog's behavior issues and will not have long-lasting effects. Without positive reinforcement added to the process, it becomes a very negative, vicious cycle.
If you want to be successful using this kind of product, consult a good positive dog-training book, or call a professional to help you.
UPDATE APRIL 2012: I would like to add a few more thoughts to my original review: I was referring specifically to training one's own dog, as it is probably impossible to train a neighbor's annoying dog w/o the neighbor's cooperation! There are sonic devices available that you can post permanently in your yard, but unfortunately, these might not always work, either.
Using this Pet-Agree device would not permanently solve the "neighbor's barking dog" problem in most cases. It might stop the dog for a few seconds, but then they would resume barking at whatever was triggering them (which is sometimes just plain old boredom).
I agree that one has to speak to the neighbor, if at all possible, and find out what your town's barking ordinance is (it differs from place to place), and notify the authorities if the dog is exceeding the accepted limits. However, I do sympathize with Paul, who has had no luck going the conventional route. Unfortunately, this does happen much of the time, and we have limited control over someone else's pets (or children, for that matter)! :-)
As far as how to combine positive reinforcement with a "startle device" such as the Pet-Agree: It would be helpful to use clicker training if one is knowledgable about the concept and coordinated enough to manage it (a good book, video, or trainer could help you).
But even w/o a clicker, I would proceed this way: Use the Pet-Agree to interrupt the barking (if it works on your dog). Coupling the word "Quiet" with the startle device, as suggested by another poster, is valid. As soon as you get a couple of seconds of silence, click/praise and give your dog a tasty treat. Call the dog over to you to get the treat and then redirect his attention AWAY from what was triggering him to bark in the first place. If he tries to go back and bark some more, repeat the above process. Redirecting his attention is key.
Contrary to a lot of dog owners' beliefs, a dog does NOT have to sit by the window and bark at everything all day long! This is barrier frustration and it will get worse. Give your dog interactive, puzzle toys and safe "chewies" to keep him occupied AWAY from the windows while you're not at home. Block his access to troublesome windows in any way you can, if at all possible.
Most of all, make sure he gets enough EXERCISE!!! Behavior problems are caused or exacerbated by insufficient exercise. Do obedience training with him, on your own or with a trainer, and practice it every day. This will give him a job to do. Much barking is caused by boredom, unexpended energy, and frustration. After all, when a dog is bored, he has limited options. He can't watch TV, surf the net, talk on his smartphone, or read a book. It's either barking, chewing, or digging...none of which are usually acceptable to humans!
As for the "smarty" dogs who manipulate you to get the treat, if you suspect this is happening after a while, just praise the dog for a good response but do NOT click or treat unless you feel it is a genuine situation, not merely a ploy to get a treat.
Hope this is not too rambling and involved. As you can see, if you have real problems, you might need the help of a professional. But good luck to all of you out there with barking dogs! (BTW, the Pet-Agree can be used to interrupt other behaviors, such as jumping up).