Make pasta according to recipe instructions.
Divide pasta dough into 4 equal pieces. Cover all but 1 piece, loosely with a towel.
Roll quarter piece of dough into a 24”x4” rectangle, about ⅛” thick and cut into 32 (1.5”x2”) pieces. Repeat steps 2 and 3 with remaining dough.
For filling: Melt butter in a skillet over medium-high heat. Add shallot and garlic and sauté for 3 to 4 minutes. Add peas and continue to saute for 2 to 3 minutes. Season with salt and pepper. Remove from heat and cool.
Pour sautéed mixture into a food processor and add mascarpone, ricotta, Parmesan, and thyme. Season with salt and pepper and pulse until fully combined.
To assemble: Beat together egg and 1 tablespoon water. Brush a piece of cut pasta with egg wash and fill with 1 heaping teaspoon pea filling. Roll pasta into the shape of a cigar.
Making sure the pasta is seam-side down, press down to seal on both sides of the filling and then pinch the dough in the same place, making small candy-shaped, filled pasta.
Repeat steps 6 and 7 until all of the pieces of cut dough have been used. Place finished caramelle onto a baking sheet sprinkled with a light coating of semolina flour.
To serve: (For about 2 people, 20 caramelle) Fill a pot with water and bring to a boil. Add a small handful of salt and add about 20 caramelle to the pot. Stir. Bring water back up to a boil and continue to boil until caramelle begin to float to the top, 4 to 5 minutes.
Meanwhile in a skillet over medium heat, melt 2 teaspoons butter. Add prosciutto and fry until crispy, 2 to 3 minutes, flipping s needed. Remove prosciutto from heat and rain on paper towels.
Add remaining butter to skillet and melt. Using a slotted spoon, strain caramelle from the boiling water into the melted butter and sauté for 3 to 4 minutes. Season with salt and pepper.
Divide pasta onto two plates and top with crispy prosciutto, grated Parmesan and fresh basil leaves. Serve.