Electric shock collars are cruel and there are moves underway to ban them.
The antibark collars that use citronella or make a noise are fine, but they do get used to them. Have you tried using a water pistol or spray bottle? Also try to remove any triggers - I had to put a postbox on the outside of my house to stop mine barking when the postman came, and taped up the letter box so the tw*ts who still put the leaflets through can't do that any more. If I go out I leave the curtains closed and the radio on.
If you are there when he barks, make him lie down and keep him there until he settles down. You should be able to give him a down command which he will recognise. Also give him a titbit when he has stopped barking, so he will learn that if he lies down and is quiet he will get a reward. Try to stay calm yourself, as shouting or getting excited makes them think there is something to bark about.