My neighbours have a dog that barks for attention, they tried one of those ultrasonic collars & the dog was slightly puzzled by the beeping at first, then just carried on barking!!
I successfully used a device to train my own dog from chasing small animals that works on similar lines. There is a collar with a small unit on it that that the dog wears, and a remote control unit that you would hold. When the dog is doing whatever you don't want it to do ie chasing squirrels, barking, jumping up, biting etc....you can press a button which releases a harmless (but very cold & sudden) blast of compressed air under the dog's chin. It interrupts the dog doing whatever you don't want it to, long enough for you to encourage the dog to do something else.
It's a very good behavioural device when used correctly...and comes with a video to teach you what to do. The good thing is that the dog doesn't know where the blast is coming from & doesn't twig that it's you!
Look on www.britishdog.co.uk. They are really helpful & would probably give you your money back if it didn't work.