The Shadow, a mysterious cowled evil Near-Human, served the Black Guardian. He existed in order to secure the sixth segment of the Key to Time.
The Guardian had given him the task of ensuring that the Doctor would never obtain the sixth segment, then disguised as Astra of Atrios. We know little of the nature of the Shadow other than he had an instinctive aversion to bright light, which defence systems of the Doctor's TARDIS generated to repel him.
The Shadow waited inside the hollow Planet of Evil suspended between the two planets of Atrios and Zeos and commanded the silent Mutes who lived there. He monitored the Doctor and Romana's quest for the first five segments of the Key to Time. He communicated with the Marshal on Atrios by a secret video communications link and manipulated him. He saw to it that he would capture Princess Astra, as well as Romana herself, in the Planet of Evil. He seemed to know of Astra's true identity not solely as a person but also as the sixth segment of the Key to Time.
The Doctor saw to it that a nuclear missile, fired by a spacecraft piloted by the Marshal himself would strike the Planet of Evil and kill the Shadow.