You cannot obtain TM Shadow Ball in Red Rescue Team.
Reason: The game does not use the Technical Machine (TM) system found in mainline Pokémon games. Moves are learned exclusively through:
How to get Shadow Ball: You must recruit or evolve a Pokémon that learns it naturally by leveling up, such as Gengar, Houndoom, Misdreavus, or Banette.
Note: TMs were introduced in the Explorers series (Time/Darkness/Sky), not the original Red/Blue Rescue Team.