In 7- or 8-inch skillet, melt butter over medium-high heat; add ham. Cook 2 minutes. Turn ham slices over.
Break eggs over ham slices. Reduce heat to medium-low. Season eggs with salt and pepper, if desired. Cover; cook 3 to 4 minutes or until eggs are sealed over and firm.
Uncover skillet. Drizzle eggs with pesto. Cover; cook 1 minute or until pesto is heated thoroughly.