In a food processor, combine garlic scapes and basil leaves. Pulse a few times until the scapes look like fine granules. Be careful not to over-process, as this will turn them into a paste.
In a medium-sized bowl, combine scape mixture with ricotta, mozzarella, parmesan, lemon juice, salt, and pepper. Stir together until combined.
Spread evenly into a baking dish and place in oven for 15 minutes or until bubbly. Optional: leave under the broiler for 5 additional minutes until the top is lightly browned.
Remove from oven and garnish with rosemary. Let rest for 5 minutes before serving.
Notes
Mix it up with different herbs and spices such as herbs de provence or red pepper flakes.