1Boil the spaghetti in a large pot of salted water for 9 minutes until just tender. Keep half a cup of the cooking water, then drain.
2Cut the carrots and onion into thin strips. Heat the oil in a wide pan over medium-high heat and fry the onion for 4 minutes until soft.
3Add the carrot strips and stir-fry for 5 minutes until they begin to soften at the edges.
4Add the sliced garlic and fry for 1 minute until golden, not brown.
5Add the spaghetti, reserved water and soy sauce. Toss over high heat for 3 minutes until the sauce coats the pasta, then season with black pepper and serve.