Step 1: Put the whole eyeshadow pot in the freezer for 2-3 hours.
Step 2: Take the eyeshadow out and place on a towel (just in case the pan falls out quickly and shatters). Use a thin knife (the blade in a Swiss Army Knife is great) and gently poke it inbetween the metal pan and the plastic pot.
Step 3: With a gentle yet firm flicking motion, try and pry the eyeshadow out. If it doesn't come out, work around the pan gradually, sticking your knife in and flicking it in the same manner.
Step 4: Because the glue has frozen, the eyeshadow should come loose easily and pop out.
Step 5: Stick a bit of thin magnet to the underside of your metal pan, and put it in your palette!