For the gnocchi: Whisk together the ricotta, egg, lemon zest, Parmigiano-Reggiano, salt and pepper in a medium bowl until smooth. Add the flour and mix until a soft, slightly wet dough forms, adding more flour if needed. Remove the dough to a lightly floured surface and gently knead until the dough just comes together. Form into a ball, wrap in plastic wrap and let rest in the refrigerator for at least 15 minutes and up to 1 day.
With lightly floured hands, shape the dough on a well-floured surface into two 1-inch-thick ropes. Cut crosswise into 1-inch pieces with a lightly floured knife. Arrange in a single layer on a lightly floured parchment-lined baking sheet.
Bring a pot of salted water to a boil. Cook the gnocchi, in batches if needed, until they float, 2 minutes. Drain well.
For the corn sauce: Heat the oil in a medium saucepan over medium heat, add the garlic, shallots and chile and cook until soft, about 2 minutes. Add the corn and saute for 5 minutes.
Add the chicken stock, bring to a boil and cook until the corn begins to soften, about 10 minutes. Remove the corn to a blender with a slotted spoon and add 1/2 cup of the cooking liquid. Blend on low speed, pulsing a few times, until smooth, adding more liquid if necessary to create a sauce consistency.
Strain the sauce through a fine-mesh strainer into a clean small saucepan and bring to a simmer. Cook until warmed through and thickened, about 15 minutes.
For the prosciutto: Heat the oil in a small saute pan until it begins to shimmer. Fry the prosciutto one slice at a time until crisp, about 1 minute.
Remove the prosciutto to a plate lined with paper towels and season with pepper. Let cool slightly and crumble into pieces.
To serve: Melt the butter in a large saute pan over medium heat until it begins to turn a light amber color. Add the drained gnocchi and cook until lightly golden, 1 1/2 to 2 minutes. Season with salt and pepper.
Spoon some of the sauce into shallow bowls and top with the gnocchi. Garnish with shaved Parmesan, crumbled prosciutto and basil.