Heat butter in a large skillet over medium-low heat. Add shallots and garlic cloves, stirring to coat. Sprinkle with sugar, 1 teaspoon salt, and the pepper, and stir to combine. Cook until very soft and golden, about 1 hour, adding water 2 tablespoons at a time if the pan seems dry.
Using a slotted spoon, transfer garlic and shallots to a bowl, and set aside. Add chicken stock, and bring to a boil, using a wooden spoon to scrape up any browned bits from the pan. Cook, stirring occasionally, until the mixture is reduced by one quarter, 2 to 4 minutes. Remove from heat, return garlic and shallots to pan, and keep warm while cooking pasta.
Bring a large saucepan of salted water to a boil. Add pasta, and cook until al dente, about 8 minutes.
Drain pasta, and return to saucepan. Stir in remaining 1/2 teaspoon salt, reserved garlic and shallots, and sauce. Cut basil leaves into thin strips. Divide the pasta and sauce among six serving bowls, and serve immediately garnished with basil and shaved Parmigiano-Reggiano.