PREHEAT OVEN TO 350F. Cook rice in salted water until tender but still undercooked (15 minutes for white rice, 30 minutes for brown). Drain, rinse with cold water, drain again and set aside. Wash spinach and remove stems. Cook spinach in the water that clings to the leaves, until wilted. Cool and chop coarsely. Heat the oil, add the onion and saute until softened. Add the garlic and thyme. Combine all the ingredients together and season with salt and pepper to taste. Lightly oil a baking dish and add the spinach mixture. Drizzle more oil over the top, if desired. Cover with foil and bake for 25 minutes. Remove foil and cook for 5 minutes more.