In order to simplify the situation, we consider that the weight Mg of an extended body acts through its centre of mass.Although the earth attracts all the particles, the net effect can be assumed to be at the centre of mass.