The answer is Only valence electrons of the central atom influence the molecular shape. Valence electrons, which are involved in the bonding, do not solely influence the molecular shape but also the non-bonding electrons (lone pair). The repulsion between these non-bonding (lone pair) electrons also influences the position of these and neighboring atoms in space. This is why water molecule is bent at 104.45 degrees due to repulsion of the electron clouds of the oxygen atom.