Preheat oven to 400°F. Grease muffin molds. Line interior of muffin molds with a slice of ham. Crack an egg into the middle of each ham ring, adding the full yolk and only slightly more than 1/2 of the egg white (if you want runny yolks. If you don't care for runny yolks you can add all of the egg white).
Spoon 1 tsp of pesto into each ham cup, placing it on top of an area with a lot of egg white surface. Bake cups for about 7-8 minutes or until egg white is set and yolks are still runny (or longer if you want the yolks to be fully cooked). Spoon an additional 1 tsp of pesto on top before serving.