When does the shape of a molecule affect its polarity?
The shape of the molecule will determine the direction of each of the individual bond dipoles, and thus, will always play a role in determining the polarity of the molecule as a whole.
Think of each polar bond in a molecule as a little arrow pointing from positive to negative. This tells us that the bond dipole is a vector quantity.
Like any other vector quantity, the direction is a vital aspect of its description. So, the geometry of the molecule determines the direction that the bond dipole vectors point.
The polarity of the molecule results from adding up all these individual bond dipoles.