Typically, students either forget the rule that the atom with the most unpaired electrons goes in the center (thus C is in the center) or they put too much stock in their Lewis structure and do not go through the VSEPR reasoning to get the shape of the molecule.
Basically, the Lewis structure has a C in the middle and each O double-bonded to the C. That is the ONLY way you can follow the rules of Lewis structures and get 8 around each atom. Now, if you got that far, your Lewis structure might have looked like this:
.. ..
:O=C=O:
it might have looked like this:
:O:
|| ..
C =O:
it might have looked like this:
..
:O=C
||
:O:
or it might have looked several different ways. However, as long you had two O’s each double-bonded to a C, you have the right Lewis structure.
REGARDLESS of which of the above Lewis structures you have, the result is that CO2 is LINEAR. Why? Because to get shape, you MUST use VSEPR. In VSEPR, you look at the groups of electrons around the central atom. There are two groups of electrons (two double bonds) around the C. VSEPR says that two groups of electrons around the central atom means that the molecule is linear. Since the molecule is linear with an O on each side of the C, the result is non-polar.