Here's how it works:
* Shadow Pokémon battles are different: When you encounter a Shadow Pokémon, you don't fight a standard battle. You're actually battling the trainer that owns the Shadow Pokémon.
* Winning is key: If you win the battle, the Shadow Pokémon is released from the control of its trainer, allowing you to capture it.
* Losing means failure: If you lose the battle, the Shadow Pokémon remains under the control of its trainer, and you don't get to capture it.
So, make sure you're prepared for the battle with a strong team!