Step 1 In a deep heavy skillet or Dutch oven, heat the oil. Add the garlic, ginger and shallots and saute until softened, about 5 minutes. Stir in the coconut milk and 2 teaspoons of the curry paste. Season the duck legs well with three-fourths teaspoon salt and add to the pan. Bring to a simmer, cover the pan and cook until the duck is very tender, about 45 minutes to 1 hour.
Step 2 Using a slotted spoon, transfer the duck legs to a plate and let stand until cool enough to handle.
Step 3Add the diced pumpkin to the pan and return to a simmer. Cook, covered, until the pumpkin is soft but not mushy, about 45 minutes.
Step 4Shred the duck meat into bite-size chunks and return it to the pan. Cook, stirring occasionally, until the meat is heated through. Stir in the lime juice. Taste and add more curry paste or salt if needed. Sprinkle with the basil and serve with rice.