(computing) A small piece of code, used as the payload of a virus or other malware, that launches a shell so that the attacker can control the compromised computer.
(computing) Software which has been designed to operate in a malicious, undesirable manner.
In hacking, a shellcode is a small piece of code used as the payload in the exploitation of a software vulnerability. It is called because it typically starts a command shell from which the attacker can control the compromised machine, but any piece of code that performs a similar task can be called shellcode.
Malware (a portmanteau for malicious software) is any software intentionally designed to cause damage to a computer, server, client, or computer network. By contrast, software that causes unintentional harm due to some deficiency is typically described as a software bug.