How to render Lattice all shape keys to images using python?
Select  lattice object and run script. Iterates thru each shapekey
and renders to "Key:" plus shapekey name dot png to the directory of your render filepath.  Make sure this is set, on linux this is commonly /tmp. 

import bpy
from os import path

context = bpy.context
scene = context.scene
lattice = context.object
fp = path.dirname(path.abspath(scene.render.filepath))
key_blocks = lattice.data.shape_keys.key_blocks
lattice.show_only_shape_key = True
for i, kb in enumerate(key_blocks):
    lattice.active_shape_key_index = i
    scene.render.filepath = path.join(fp, "Key:%s.png" % kb.name)
    bpy.ops.render.opengl(write_still=True)
scene.render.filepath = fp


Used render.opengl for testing purposes.  Change to render.render if desired.