While I designed this as a chanterelle risotto, nothing will go wrong if you use other mushrooms. Chanties and corn really love each other, though. Only chicken of the woods has an affinity for corn like chanterelles. Also, be sure to use a risotto rice like Arborio.
Bring the chicken or other stock to a gentle simmer in a pot. Heat 2 tablespoons of the butter in another pot and cook the shallot over medium heat until it softens, about 4 minutes. Salt it as it cooks.
Add the garlic and diced chanterelles and turn the heat to medium-high. Stirring often, cook for 5 minutes. Stir in the rice and cook another 2 minutes or so. You want the rice to get a little translucent.
Pour in the white wine and add the thyme. The pot will sputter. Stir constantly until the rice has absorbed the wine.
Once the wine has been absorbed, start adding the hot stock, a ladle or two at a time. You want to stir the rice often at this point, about every other minute or so. Keep it bubbling and boiling at a steady heat -- normally this means keeping the burner at medium. Keep adding stock and stirring often until the rice is cooked, but still a little al dente at the center, about 20 minutes.
When the rice is nearly done, stir in the corn and grated cheese and add the final 2 tablespoons of butter. You want this to be a bit soupy, so add more stock. If you're out of stock, add water. Add salt to taste and serve.