Melt the butter in a large pot over medium-low heat. Add the shallots and cook, stirring often, until soft and translucent, 8-10 minutes. Add the chicken stock, corn kernels, broken cobs, whole ear of corn, salt and pepper to the pot. Bring to a boil, then reduce the heat to medium-low and cook uncovered for 10 minutes. Remove the whole ear of corn and set aside to cool. Cook the soup for 10 minutes more, then remove the broken cobs from the pot and discard.