Cook spaghetti, al dente, just follow instructions at the packaging.
While spaghetti is cooking, heat a pan over medium fire.
Add olive oil, about 2 tablespoons.
Saute garlic, onion until fragrant and onion is soft and translucent.
Add sun-dried tomatoes, cooked for about a minute then add salmon.
Add cooked spaghetti and some of the pasta water, about ¼ cup.
Toss gently to combine, season with ground black pepper.
Add the fresh basil leaves, mix to combine.
Turn off heat.
Sprinkle some grated Parmesan cheese and red pepper flakes, if using, on top just before serving.