When writing stories I usually use war as a simple and understandable way to introduce a conflict that needs to be resolved or sweeps the character away.
To keep it interesting I need to build versatility into the weapons and gear of the characters. After all at best I can say "he hits/misses". It's everything around it that matters: what the characters do, what they have available, how they react to the situation, how they react after it's conclusion, what they do afterwards and how they react the next time. For this reason I look at various things like gadgets (jumpjets) and the choice of weapon they carry.
A sniper is relatively boring. It's the penultimate "your shot hit or misses" weapon. It only becomes really interesting if you fight another sniper or create situations where they need to use environment (thunder) to hide their shots. It's severely limiting in the type of story you tell.
A machine gun or rifle offers more versatility for a story, but the weapon I go to is the shotgun. It is a close-quarters weapon and allows me to let the characters get into hand-to-hand combat, you can equip a large variety of slug ammunition and it is far less clean than the "hit enemy far away and ignore the bodies aferwards" storytelling I dislike.
Among the ammunition I would want to have armor-piercing slug ammunition. However general concensus is "this slug I heard off didn't have the speed and couldn't penetrate so none can". So I want to have a solid and above all complete answer on how exactly an armor-piercing shotgun slug could be fired by a shotgun, or why not.
For reference: many sniper rifles have shorter barrels, even the anti-material rifles have a maximum barrel length akin to that of some shotguns and the closest size in barrel diameter. Yet when people talk about shotguns it is a solid "impossible" with statements of what some slugs can achieve rather than what is possible.
To make the title clear with my full question:
How could a shotgun fire armor-piercing ammunition effectively?
Extra information:
- this question is about both the shotgun and the slugs. If you need to redesign both the shotgun and slug to be effective that is possible, as long as the shotgun remains a shotgun in functioning.
- this question is about what is POSSIBLE, not about a list of what is not possible. If you have something that makes it impossible, explain what would be necessary to make it possible and why that is unattainable.
- the answer with the best AP ability is the best answer, unless a reasonable and detailed answer can be given explaining why it is impossible.
- a lower accuracy is acceptable as long as it's not a cointoss to see if you can hit the side of a proverbial barn.