1. Preheat oven to 400 degrees Fahrenheit.
2. Cook spaghetti until al dente, about eight minutes. Drain and rinse under cold water.
3. In a large bowl, toss spaghetti with eggs, salt, and garlic and mix to combine.
4. Spray a muffin tin with cooking spray and nest spaghetti inside. Using the bottom of a shot glass, press down firmly to create a well.
5. Bake until set, about 15 minutes. Let cool. (If nests puff up while baking, press down again with shot glass.)