Wash the tomatoes and pat dry. Slice the top off and hollow out the inside of the tomato, being careful not to pierce the sides. I use a small paring knife for this, running it around the inside and scoring it into 4 sections to remove. Carefully scoop out the cavity with a large spoon, removing the seeds and membrane.
Salt the cavities and place them upside down on paper towels to drain for 30 minutes.
Preheat the oven to 350 degrees F. While the tomatoes are draining, prepare the filling.
Heat the olive oil in a large skillet over medium heat. Saute the onion until translucent, about 3-4 minutes.
Add the garlic and drained spinach to the skillet, cover, and cook on low heat for 8-10 minutes, stirring occasionally.
In a large bowl, stir together the cottage cheese, parmesan cheese, egg yolks, salt, pepper, and basil until combined.
Add the spinach mixture to the bowl and stir the filling well to mix.
Pat the tomato cavities dry with paper towels and place them into a greased square baking dish. Spoon the spinach mixture into the tomatoes. Spray with olive oil spray (or drizzle with olive oil- I do both) and bake for 25 minutes.
Using a microplane grater, finely grate some extra parmesan cheese on top of each tomato and bake for 5-7 minutes more, until th cheese is melted and tomatoes are bubbly.
Garnish with coarse salt and freshly chopped parsley or basil, if desired.