Use a fork to puncture the spaghetti squash all over. Microwave on high for 5 minutes. Flip and microwave for another 3-5 minutes (3 for smaller squash, 5 for bigger ones). Allow the squash to rest on the counter for at least 5 minutes before slicing it in half.
Meanwhile, melt 1 tablespoon of butter in a large pan. Once melted, add the onion and mushroom and saute until the mushroom begins to soften about 6 minutes.
Add the remaining tablespoon of butter, along with the spinach, and continue to cook until the spinach wilts.
Meanwhile, remove the seeds and shred the squash with a fork.
Remove pan from heat and stir in the squash, pesto, parmesan, and olive oil. Taste the squash and add salt as needed (each brand of prepared pesto will have different amounts of salt in them, I typically add 1/2 teaspoon).
Top your squash with sliced tomatoes and toasted pine nuts, and enjoy!