What is the best way to get a dog to stop barking?

dogedit  |  May 27th 2010

Lady has been barking at our new neighbors a lot lately. I don’t want to reward her barking by giving her any kind of attention, even saying “no”. Is is okay to use a can of pennies and shake it to get her to stop barking? I’ve tried it a few times, and now sometimes even if she sees the can she’ll just go around to the back yard (kind of to avoid it). It seems to work because it gets her attention and startles her a little bit. I don’t want to teach her to be afraid of me when I have the can, or produce any other negative behaviour or fear by doing this. What does everyone think?