You can use a specific column for extruding a shapefile to a kml using GDAL's ogr2ogr utility, but only if it's been compiled with libkml support. If it's been compiled with libkml support, that will become the default KML driver.
So you can try the following, first specify the zfield to be used in an environment variable, then run the ogr2ogr utility:
# Use **export** if on linux, but use **set** command instead if on Windows!
ogr2ogr -f libkml output.kml input.shp
zfield is the name of the actual column that contains the z values
Then there is also the creation option available for the regular KML driver, but this doesn't specify a field for extrusion, only the altitudeMode:
ogr2ogr -f KML output.kml input.shp -dsco AltitudeMode=absolute
AltitudeMode options are in the link I gave there, but the default is