After a successful battle, you'll have an opportunity to catch one of the Shadow Pokémon that Team GO Rocket has carelessly abandoned.
After catching the Shadow Pokémon, you'll be able to use a process called Purification to return the Shadow Pokémon to its normal state.