I’m not sure about shotguns, but a couple hundred .38 caliber, glove-mounted, punch guns were issued by the US Navy in World War II. As far as I know, none of them ever saw use in combat. The design expected you to actually throw a punch, the force of the impact would depress the trigger and fire.
Because of how short the barrel would be, you’d basically be restricted to putting barrel close to, or direct contact with, the victim. To be fair, shotgun shells are (comparatively) low power, so it’s not any less viable than a .38 cartridge.
The big downside with these things was, you couldn’t use them at range and they were single shot (with a cumbersome reloading process).
So, no, these are real, they’re just not very useful. They are an interesting historical curiosity, though.