"shell code" comes from back in the day when such code would usually "spawn a shell", essentially calling /bin/sh to yield a shell with elevated privileges (i.e., the privileges of the program being exploited; imagine being a normal user, able to call a program that runs with root privileges, then if you can trick the program into running arbitrary code, you can run code as root although you're a normal user). Ideally, when called across a network (say you could get Apache to execute random code you put into a GET header), such a shell should be accessible on some port so that you could telnet to that port and be 'logged on remotely'.
This 'shell code' was the 'payload' of other code that exploited e.g. a buffer overflow; the goal of such an exploit was always to trick some program into executing that payload, i.e. the shell code. So there were/are essentially two parts to writing an exploit - first getting the software to actually execute random code, secondly (if you actually want to use the exploit) write shell code that does something useful to an attacker, like spawn a shell or (as in the OP) drop firewall rules.
As a less objective side note, writing 'shell code' was always considered (in the circles I hung around in) as being less honorable and prestigious. The 'exploit writers' (exploiting the primary bug) were the samurais, the shell code guys the ninjas, as it were. Writing shell code was considered a bit dirty grunt work, and only script kiddies needed it anyway, because after the PoC for the actual exploit was done, the 'interesting' part was over. (I never 100% agreed with this, for some exploits you need some serious trickery to make your PoC actually do something useful).