nikeThe Panama Papers, the biggest collection of financial documents ever leaked to journalists, has revealed the shady world of offshore tax havens.

More than 11.5 million documents were obtained by the German newspaper Sueddeutsche Zeitung — and shared with the International Consortium of Investigative Journalists — via Mossack Fonseca, an international law firm based in Panama. They reveal methods that are not illegal in and of themselves, but can cost an investor’s own country plenty in tax revenue.

Here’s a look at how wealthy foreign investors move money in and out of offshore companies and other structures.

Step 1: Choose a haven

Step 2: Create a corporation or other entity

Step 3: Create a (secret) identity

Step 4: Open a bank account

Step 5: Move the money

Step 6: Spend the money