I believe in training a dog, or any animal, (human) when it is hungry. Get it's attention. If it is already gun shy, real hungry. In the case of breaking to the gun, shoot at a distance and gradually get closer while eating. At some point that animal will associate that loud noise with pleasure, and figure out that it is not that bad. It always works, with the choice between starvation and the loud noise they will figure it out.
I was a falconer, and to break a wild bird you keep it on your fist, with a piece of meat in your fist at its feet. When it is hungry enough, it will bend its head and eat, thus making the choice to trust you. Then you own them. You may say that starveing is cruel, but I never have to beat an animal, just give them a choice, they know what happens when they don't eat, you, or the loud noise are an unknown.