Follow it step by step.
Step 1: You take the Gardevoir and shuffle it into your deck.
This leaves you with a Ralts.
Step 2: Check if the Ralts is now KO'd because of damage counters, and discard any DRE that you have attached to it.
Step 3: Search you deck that evolves from Ralts. That is Kirlia.
Step 4: Attach said Kirlia to Ralts.