Barking is a normal dog behaviour and can be useful in warning people of danger and warding off pests. Dogs bark to get your attention, to warn you of danger and to keep other animals away from their territory. But if your neighbours' dogs are barking when their owners aren't home, it's likely because of separation anxiety. Using loud noises can be an effective way of training the dogs to stop their incessant barking.
Gather the materials you will need to make the loud noise. You need something that will sound very unpleasant to the dogs and will scare them into stopping the barking behaviour. A stick and a metal dustbin lid or objects that will make equivalent sounds should work well.
Wait for the dogs to start barking. As the barking reaches its loudest level, begin banging on the garbage can lid with the stick. The noise you must be loud, but not so loud that you can't hear the dogs barking. As soon as they stop barking, stop banging on the garbage can lid. This will teach the dogs to associate the noise with the behaviour.
Repeat as often as you can, or whenever the dogs bark. There is a balance here, because you don't want the dogs to become accustomed to the noise. If this happens, find another loud noise you can make. For instance, the sound of a blow horn may scare the dogs.
Talk to your neighbour about the dogs' barking. Suggest that the neighbour purchase bark collars. If your neighbour doesn't want to buy bark collars but does agree to help, ask him to provide the dogs plenty of food and water, toys and a comfortable bed. This can lessen the dogs' anxiety when their owner is away.
Do not trespass on your neighbour's property when executing this training. Your neighbour could press charges if you do.