Bring a large pot of lightly salted water to a boil. Add the gnocchi, and cook until tender, about 5 minutes. Drain, and set aside.
Once the gnocchi goes into the pot, start the sauce, as you want the gnocchi to be done first. Melt the butter in a saucepan over medium heat. Add the shallots, and cook for a few minutes, until tender. Stir in the cream, and heat to almost a boil. Gradually mix in the fontina and parmesan cheeses, being careful not to boil. Stir until smooth, then remove from the heat immediately, or the sauce may clump.
Place gnocchi into serving dishes, and spoon the sauce over them. Garnish with chopped fresh basil.