Machine gun, because it is automatic and is far and close range. Unlike shotguns, which are only close range. I love the AK-47, it's absolutely perfect.
I don't like any of the machine guns.. I'm a big fan of the P90; I'm not a huge fan of a lot of the assault rifles.. but I do like the shotguns.. my best kill streak (44) was with a shotgun.
Personally, I dislike both but I would choose the shotty over the MG because of mobility. I'm the type of guy that runs around a lot so the MG doesn't fit my style. If given the choice, I would choose a rifle or SMG over the shotty.
the machine guns of cod 4 are better they are good at long range and close quarters but a shot gun is useless in long and medium range and most fights in cod are long to medium distance fights but its good for close range and the worst thing about a shot gun is that it takes ages to reload.