Adding the under barrel shotgun to your rifle gives you the ability to carry a third style of weapon, but if you’re not familiar with it using it might be a challenge. I was looking for the answer myself and couldn’t find it easily so I wanted to share it when I found the answer.
On guns like the AN-94, the 12-Gauge Deputy option for the under barrel gives you a secondary fire that you can toggle between. On PC the B key will toggle between main fire and your 12-gauge. It is the third option on the under barrel load out for the AN-94, an assault rifle.