The molecule CO2 have 2 lone pairs located in the oxygen atoms. It has two double bonds also connecting carbon atom to the two oxygen atoms. It does obey the octet rule so the atoms need 8 electrons in each of them that is why electrons are shared.
Running cars on electricity would conserve gasoline because electric cars do not use the same resources.
Hope this helps!