Put the olive oil and anchovies in a 12-inch skillet and place over medium low heat. Cook, stirring, until the anchovies have dissolved. Add the onions, season with salt and pepper (go light on the salt because of the anchovies), and continue cooking until the onions have wilted completely and become very tender, 20 to 30 minutes.
Raise the heat to medium high and cook, stirring, until the onions turn to a rich golden color. Add the wine and continue cooking until most of the wine has evaporated. Add the capers and parsley, cook for a couple more minutes then remove from the heat and set aside.
Fill a pot for the pasta with about 6quarts of water, cover, and place over high heat. When the water boils, add 2tablespoons salt and the spaghetti. Stir until all the strands are submerged and cook until al dente. When the pasta is almost done reheat the sauce. When the pasta is done, drain well, toss with the sauce and serve at once.