The Shadowlord’s Castle is basically the end-game dungeon and boss fight, you can unlock it after completing all of the various different side quests on both the first and section section of the game.
You will be required to collect all 5 Key Fragments, which you can get from the following locations;
The Law of Robotics – Junk Heap
The Stone Guardian – Lost Shrine
Loyal Cerberus – Desert
The Memory Tree – Forest of Myth
Sacrifice – The Aerie
After doing all of that you will also achieve the Key Collector trophy achievement and then unlock the passage to the Shadowlord’s Castle
(Note: The Key Fragments are actually unmissable and are story related)
SHADOWLORD’S CASTLE ENTRANCE:
After doing all of that and to actually gain entry to the Castle you will need to speak to Popola and then head to the Lost Shrine
When you reach the courtyard make sure to interact with the birds to trigger a riddle that you will need to answer correctly otherwise you will get stuck in a loop, the correct answers are as follows;
Q: Why did humans disappear from the world?
A: Because of a black scrawl disease.
Q: How can humans extend their lives?
A: By separating body from soul.
Q: What is the destination of souls?
A: They are placed in their corresponding shells.
(Note: Entering the following portal into Shadowlord’s Castle will result in you not being able to leave, so make sure to save before actually entering)
You will then be inside the Shadowlord’s Castle in which you will have to fight several bosses before the Shadowlord himself.