Initially try to ignore the barking so the dog won t start associating barking with attention from you.
Train your dog not to bark.
If your dog is excessively barking for attention a way to undo this behavior is to ignore them.
When your dog understands and stops barking use your clicker and a treat.
If that doesn t work try distracting your dog by dropping something opening the pantry or giving it something else to investigate.
You should also give your dog some affection when he listens.
Stop feeding treats as soon as your friend and their dog disappear from view.
If you re in your home teaching your dog to go to their spot when people approach the front door will also help distract them while establishing a pattern of staying quiet when visitors arrive.
Use dog treats to hold your dog s attention until the other people pass by only rewarding your dog if they don t bark.
To train dogs not to bark avoid responding with shouting since your dog may interpret this as positive attention.
Have a friend with a dog stand out of sight or far enough away so your dog won t bark at the other dog.
Remember not to try to progress too quickly as it may take days or weeks before your dog can pay attention to you and the treats without barking at the other dog.
Right after you use your voice command and your dog stops barking click twice and give your dog a treat.
Repeat the process multiple times.
Have them with you at all times.