To make gluten-free: Omit the flour. Instead, add double the amount of cream cheese and melt it into the shallots before adding the broth and half and half. Once you've added the half and half, bring it to a simmer. In a small bowl, whisk 1 1/2 tablespoons of cornstarch with 1/4 cup of cold water until smooth. Pour the slurry into the mushroom sauce and bring back to a simmer, stirring often. Simmer for 5 minutes before adding the green beans to the sauce.