Heat your oven to 350 degrees,and place an oven rack on the second lowest position. I sautéed the mushrooms first, you could skip this step but I thought sautéing them would lend them more flavor. Heat the olive oil over medium heat, add the mushrooms, and season with a bit of salt and pepper. Sauté for 4-5 minutes, until the mushrooms have browned.
In a small bowl, mix the ricotta, lemon juice, and a dash of salt and pepper together. Then spread it over the pita.
Add the spinach and mushrooms and top, leaving space in the center of the pita for the egg. Crack the egg in the center of the pita, and drizzle the pesto over.
Place in the oven and let bake for 20 minutes, or until the egg white is fully cooked.