Introducing your duck dog to gunfire is one of the most important training steps in developing a consistent retriever.
Introducing your duck dog to gunfire is the next big step after basic land and water retrieves, but you definitely have to take a gradual approach.
Have a look as Lone Duck Outfitters gives some great basic lessons on working gunfire into the training mix.
Some great training tips from guys who know how to work a retriever and make them into great gun dogs. Biggest takeaway is to start gradually and at a distance with a blank pistol and start those retrieves. Over multiple sessions, without rushing the training, get the dog used to gunfire. When your hunting buddy is completely comfortable with distant gunshots move the gunfire closer. You will know when your retriever is ready for close in shotgun work by its reaction. The final word of caution is to not rush the training or you can end up with a gun shy dog; and that is going to cost you a lot of time, and potentially pro trainer money, to get the dog back on track for retriever progression.
The final product should be a dog that loves hearing the blast of a shotgun as my two retrievers do, heck their tails start wagging as soon as they see a shotgun or gun case even before heading out.