Step 1: Go to cave entrance

Go to the cave entrance in E4. You will see a large condor fly past.
Step 2: Hitch a ride with condor

Position yourself near the center of the screen, where the condor will swoop down the lowest. As the condor flies by, use an action on it. Graham will jump, and if your timing is correct, he will grab onto the condor and be taken into the air.
This is much more difficult to do than how it is explained. The condor will make three passes each time you enter the screen. If you don't get it in three tries, you will have to exit the screen and come back. For more tips, see this page on catching the condor. This may take a few tries, but don't give up—you'll get it!
Step 3: Get mushroom

The condor will take you for a ride for a bit and let you go. Graham will drop to the ground, but rise unhurt. You are in B1 and will notice there is a hole almost directly in front of you. Do not go down this hole yet. Instead, go to the screen to the left. You will find Graham is on the east bank of B8 and can now pickup the mushroom. Get the mushroom and go back to the previous screen.
Step 4: Enter leprechaun cave

Enter the leprechaun cave by dropping down the hole. It's a tough fall, but Graham will be okay. Take a look at the map of the leprechaun cave and make your way to the rat.
Step 5: Give rat cheese

The rat is standing in front of a door and you will have to get by him before passing though. Don't get too close to the rat (like he wants you to) or he will claw you up and end your game. All the closer you need to get is when the rat starts to talk to you. When he does, give him the cheese and he will disappear, allowing you to pass.
Step 6: Play fiddle for leprechaun guards

When you enter the room after passing though the door, you will see two leprechaun guards approach and stand guard. For them, you can play the fiddle. They will then begin to dance as you play and disappear.
Step 7: Enter Leprechaun King's throne room

After the leprechaun guards disappear, continue into the King's throne room. You will see several leprechaun's dancing around, and one by one, they will all disappear until only the Leprechaun King is left. Rather then disappear, he will drop his scepter and dance off the screen.
Step 8: Pick up scepter

When the Leprechaun King has left, you will be able to move about again. The king has dropped his scepter, which you can then pick up.
Step 9: Pick up Magic Shield

Once you have the scepter, pick up the Magic Shield. This is the last of the three treasures you need to complete your quest.
Step 10: Go to small opening

When you have your treasures, go to the next screen. You will see a tiny opening to the outside world. Graham can not fit though this opening the way he is. In order to do so, use the mushroom, and Graham will shrink. Quickly make your way out of the opening—the mushroom's effect's don't last long. Once Graham is outside, he will grow back to normal size.
Step 11: Return to castle

Your quest is now at an end. Return to the castle with the lost treasures and you will see the end sequence to the game. You will also see your finial score and find out if you achieved all the points possible.
Vareations
The method mentioned above will result in the most possible points, but this is not the only way to get the Magic Shield.
Give the rat something other than cheese
You can give the rat anything valuable to get him to let you though. This isn't recommended because you loss points for doing so. And if you give him something like the Magic Mirror, you will not be able to finish the game.
Show the Leprechaun Guards the four-leaf clover
When in front of the leprechaun guards, you can use the four- leaf clover on them. Out of respect, they will disappear. Then, you enter the King's throne room, all the leprechauns there will also leave. The big difference is, the Leprechaun King will not leave behind his scepter.