We used a lemon-spray collar that worked well.
It launched some lemon scent to the doggys face when he barked. We had to do it because we live in an apartment building and neighbors didn't like it. He never barked when we were around, only when he was alone. Nowdays we put the collar on, but it doesn't have a battery in it anymore, so he could bark as much as he'd like without retaliation.. but he doesn't
