God, this has been answered so many damn times, I even think there's a sticky and before you make another thread;
Shadow pokemon are healed by;
Battling;
Being summoned into battle
Being called when entering hyper/reverse/whatever mode
Walking;
Day Care
Walking around
Using the Scent/Collone on them.
Purifying Chambers
That is all the ways to purify them.