Remove the fat close to the cavity of the duck. Wash the duck and pat dry. Rub all over with half of the salt and pepper. Stuff the front cavity (at the neck) with some of the apples, then bring the flap of skin over the apples and secure with a toothpick.
In a bowl, mix the shallots, prunes, thyme, remaining apples and some of the remaining pepper. Place in the large cavity. Rub the du