Overeating is a very complicated matter because people can overeat due to so many reasons. While it would be probably beneficial to use a bit of shame to try to impact a “normal” someone to eat in a more healthy way or take more care of their health, that isn’t always true.

Take, for example, a child or adolescent who is being abused and overeats  to soothe the pain, the stress, the rejection, etc. and becomes very fat. If you come and simply shame that child about their fatness without dealing with the main trauma causing them to overeat and be fat, you’re just emotionally assaulting the child, and you are effectively doing harm to them. That’s not what they need. Overeating to them is a coping mechanism and an *essential* one. You would need to help them develop more healthy eating habits through supportive actions.  Even a normal child who is just being brought up wrong about their diet could probably benefit more from positive reinforcement, guidelines and support, instead of the shaming and scolding.
So, it’s very important to understand the context of unhealthy eating and the emotional factors. Sure, when there isn’t anything more grave going on in the life of the person, shaming could be an alternative.