You'd need multiple hooks for this most likely - first, one on firing that would be capable of setting a tag on the weapon to mark that it fired. Then another on adding items to the list of actions when clicking a weapon, capable of setting the name of the action and its cost. Then finally another, or possibly another version of the first that reads the tag that was set to prevent the shot, but it resets the tag.
The "on firing" hook itself is probably easier to tackle, but as Meridian said we'd have to pick what number should be altered by the script that would be important here. Maybe something like a chance of preventing the firing from happening, or amount of ammo consumed? I'm somewhat interested in a script like this as well to have energy weapons that have more powerful shots that take up more of a battery than a lower power shot, but it's a low priority for me.
The alterations of the action menu items in a script will likely never happen as the costs and types of actions are important "constants" throughout the code.
I guess if the "on firing" hook could determine both a chance of the shot firing and the ammo consumed by the shot, you could make two actions on the shotgun: 1. firing, which sets a tag on the weapon saying it just fired, but is scripted to not shoot or consume ammo if 'just fired' is set and 2. pumping, which resets the 'just fired' tag.
More importantly, what would pumping a shotgun add to a mod that increasing the TU cost of firing wouldn't? It seems to me like extra fine-grain detail for detail's sake, not making the game more enjoyable.