create_shape function

Helper to create a shape