Weren't shotguns fairly common on private seagoing vessels at one time, and more or less ignored as long as they stay on the boat while in port?
I was just thinking; my 835 with a modified choke on a 28" ported barrel puts 4 pellets of an 18 pellet 3.5" magnum 00 load on an IDPA target at 100yds with enough force to punch 1" into pine. Targets flanking that one get 2-3 pellets each, and the gun holds 4+1 of those without an extension. Three of those rapid firing from concealment when the pirates are ~75 yards out might not be a major bloodbath, but it should dramatically reduce their combat effectiveness. (at least to the point of making it hard to aim an RPG - concealment and suppressive shotgun fire makes aimed return fire with rifles difficult) Add in one with a slug barrel aiming for their waterline when they're days from a friendly port and you ought to be able to convince them to look for easier pickings.
That RPG can hit you from 600+ yards away.
The AK's can hit you from 400+ yards away.
Your shotgun is worthless even against their fiberglass hull (let alone if it's steel or aluminum) past 200 yards.
The drop of a slug is so severe at 200+ yards that you couldn't put a slug within 3 feet of the waterline of a vessel. You'd have more luck with an old black powder mortar or cannon.
To fend of pirates, you need at minimum, a belt fed .30 caliber and the skill to use it to 500 yards minimum. Ideally, to 900+ yards and outside of RPG distance. At that distance, bullets will be more "falling" and less "cruising" through the air. You're more likely to pierce the bottom of the boat than the waterline of the hull. 147gr .308 bullets drop about 850 inches from the muzzle at 1000 yards. More than 70 feet. With a 200 yard zero, you have to aim 790 inches above the target. And it's gonna drop from 2750fps at the muzzle to a mere 750fps at 1000 yards. That's with a 147gr FMJ .308 bullet with sectional density of 0.221.
The larger your ship is, the better the odds are in favor of the pirates. RPG accuracy matters less when your ship is 100 yards long and 20 yards tall at the water line. Their boats are faster and more maneuverable than yours, so you can't outrun them. You then have to carry more ammo to fend them off longer while you await response to your emergency SOS radio call.