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.
Shell companies can be used to transfer assets of one company onto a new company without having the liabilities of the former company. For example, when Sega Sammy Holdings purchased the bankrupt Index Corporation, they created a shell corporation called Sega Dream Corporation in order to transfer valuables assets such as the Atlus brand and Index Corporation's Intellectual Properties into a new company.  This meant that the liabilities of the former company were not attached, as a shell corporation is registered as a separate legal entity. This process resulted in the former Index Corporation being dissolved. Sega Dream Corporation was eventually renamed as Index Corporation.
Shell corporations have been used to commit fraud, by repeatedly creating an empty shell corporation with a name similar to existing real corporations, then running up the price of the empty shell and suddenly selling it ( pump and dump).
There are also shell companies that were created for the purpose of owning assets (including tangibles, such as a real estate for property development, and intangibles, such as royalties or copyrights) and receiving income. Reasons behind creating such a shell company may include protection against litigation and/or tax benefits (some expenses that would not be deductible for an individual may be deductible for a corporation). Sometimes, shell companies are used for tax evasion or tax avoidance.
After Prime Minister Narendra Modi's decision to demonetise ₹500 and ₹1000 rupee notes on 8th November 2016,    various authorities noticed a surge in shell companies depositing cash in banks, possibly in an attempt to hide the real owner of the wealth. In response, in July 2017, the authorities ordered nearly two hundred thousand shell companies to be shut down while Securities and Exchange Board of India (SEBI) imposed trading restrictions on 162 listed entities as shell companies. A high-level task force found that hundreds of shell companies were registered in a few buildings in Kolkata. Many of those were found to be locked, with their padlocks coated in dust and many others which had office space the size of cubicles. 
Entrepreneurial behavior in challenging environments
In some developing economies (e.g. some of the post-Soviet states), shell companies allow private entrepreneurship to survive in an environment where an inadequate legal system leads to arbitrariness and corruption. In these challenging environments, entrepreneurs operating a relatively small private business with limited resources sometimes set up shell enterprises to lower or avoid taxes, because tax avoidance or evasion may be a necessity for business survival in situations where the level of taxation is penal, government officials (including tax officials) demand bribes, working capital is in short supply, and tax legislation is hostile to private entrepreneurial businesses, e.g. when tax laws are extremely complicated and change arbitrarily and rapidly.
The U.S. Securities and Exchange Commission defines a "shell" company to refer to a publicly held company with no or nominal assets other than money.