Bring a pot of water to bring. Add the salt and pasta. Cook the pasta according to the package direction.
When the pasta is about to finish, heat olive oil in a skillet and add the garlic, anchovies, and chili flakes (if using) and cook until the anchovies dissolves, about 1 minute.
Add the cooked pasta and the basil to the skillet and toss. Sprinkle with Parmesan cheese. Drizzle more olive oil if needed. Serve immediately.