Potato starch is the best substitute for flour in shepherd's pie. For this recipe, I use potato starch to thicken the filling. If you don't have potato starch, you can swap it out for cornstarch instead, although you will want to start with less and add more only as needed. Cornstarch is super absorbent, so you don't need much.