Bring a large pot of salted water to boil and cook pasta a few minutes shy of the directions on the box. They will finish cooking in the anchovy/onion mixture.
In a large frying pan toast the breadcrumbs, stirring occasionally and watching carefully so they don't burn. Remove them from the heat and set aside.
Using the same frying pan, add olive oil (you can use the oil from the anchovy tin) , and once the oil starts to shimmer add the sliced onion's and soften a bit approximately 5 minutes.
Once the onions start to soften add the anchovies, using a wooden spoon to mash them. As they heat up they will become soft and liquify a bit.
Add the red pepper flakes if using.
Continue to cook until the onions are soft and very tender and the anchovies are blended in almost like a paste.
Slowly add some pasta water, approximately 3/4 - 1 cup to the onion and anchovy mixture until a nice sauce forms.
Once pasta is ready reserve one cup of the pasta water before draining. Add the pasta to the frying pan with anchovy/onion mixture. Mix everything together adding some additional pasta water if needed. The pasta should be more on the dry side, so you will not need all the water. Toss and taste, if needed add a bit of salt.
Sprinkle the pasta with the toasted breadcrumbs.