You should ask your question on the Wowhead Forums next time, in the Priest section, since your question is specific to Priests.
The first phase is trivially easy. It sucks for all casters, and there's nothing you can do about it, but it doesn't make a difference because it's so easy, so don't worry about it. The best thing you can do is not take damage - your healer needs to go into Phase 2 with full mana, especially if your group is inexperienced or undergeared.
In Phase 2, here are some things you should think about as a Shadow Priest:
-This goes for everyone, not just Shadow Priests: make sure that when the tank pulls a berserker spirit, you're near one of Hakkar's Chains, so that if you get targeted with Body Slam, it hits the chain. Screwing this up usually means a wipe. Don't stand where Body Slam lands.
-Dot up the vulnerable chain and help take down the spirit adds. If there are only a few spirits around, you can safely DPS the chain, but be ready to stop when more of them spawn.
-Have Power Word: Shield handy for your healer because s/he will definitely draw healing aggro on those spirits (unless your healer is a Priest who knows how to Fade). The spirit adds do a fairly significant amount of damage to non-tanks, so if you aggro them, try not to let them hit you either. (TidyPlates is a great addon for knowing who nearby is aggro on you.)
-Save Dispersion for if you need to move through an area cluttered with spirit adds, or the circle left behind by Body Slam. You'll be moving a lot to avoid the Shadow Crash type nukes anyway, so always be aware that you're not putting yourself in danger when you move.
-Don't be afraid to Divine Hymn if your group is bad at avoiding damage in this phase. The best thing you can do is help your group survive: the required damage output is easy to achieve, but the possible damage taken is dangerously high.
tl;dr Don't take damage; help keep your group alive (by killing spirits, shielding, and offhealing if necessary); and DPS the chain. In that order.