Make sure that you have 60 HP, 60 FP, and 30 BP. When you fight her just as Peach use Vivian as your partner. Then. use the spinning jump and Vivian's Shade Fist until the Shadow Queen turns into her other form. Then switch to Koops. Use his power shell to attack the hands and the body. Then, use the Power Smash badge. Also, when she adds 7 more to her next attack, use either Koops' Shell Shield or Vivians Veil. Make sure both Koops' and Vivian's level is at the highest. Repeat this and you should be able to win. Do not forget to heal and make sure you have a lot of Life Shrooms.