Boil pasta until al dente.
While pasta is cooking, melt the butter in a large skillet. Add garlic and red pepper flakes, if using, and cook for 1 minute, being careful not to burn the garlic or it will be bitter. Add the white wine or water, bring to a boil and cook to reduce the liquid by half, 2-3 minutes.
Add the clams, cover with a tight-fitting lid, and cook until the clams have opened, 6-8 minutes. Discard any clams that remain unopened. Season to taste with salt and pepper.
Add the drained pasta to the clams and cook on low heat, stirring continuously for 1 minutes, to finishing cooking the pasta in the sauce. Garnish with parsley and serve.