A shell corporation is a company which serves as a vehicle for business transactions without itself having any significant assets or operations. Sometimes, shell companies are used for tax evasion or tax avoidance, or to achieve a specific goal such as anonymity.
Some companies may have had operations, but those may have shrunk due to unfavorable market conditions or company mismanagement. A shell corporation may also arise when a company's operations have been wound up, for example following a takeover, but the "shell" of the original company continues to exist. It's important to understand that the term "shell corporation" does not describe the purpose of a corporate entity. In general, it's more informative to classify an entity according to its role in a particular corporate structure; e.g. holding company, general partner, or a limited partner.
Shell corporations are not in themselves illegal, and they do have legitimate business purposes. However, they are a main component of the underground economy, especially those based in tax havens. They may also be known as international business companies, personal investment companies, front companies, or "mailbox" companies. Shell companies can also be used for tax avoidance. A classic tax avoidance operation may utilize favorable transfer pricing among multiple corporate entities to lower tax liability in a certain country; e.g. Double Irish arrangement.
A special purpose entity, used often in the context of a larger corporate structure, may be formed to achieve a specific goal; e.g. anonymity.