Shapefiles have no type MultiPolygon (type = Polygon), but they support them anyway (all rings are stored in one polygon = list of polygons, look at GDAL: ESRI Shapefile)
It is easier with Fiona and Shapely:
import fiona
from shapely.geometry import shape, mapping
# open the original MultiPolygon file
with fiona.open('multipolygons.shp') as inputsource:
# create the new file: the driver, crs and schemacrs are the same
# for the schema the geometry type is "Polygon" instead
output_schema = dict(source.schema) # make an independant copy
output_schema['geometry'] = "Polygon"
with fiona.open('output.shp', 'w',driver=input
driver=source.driver,
crs=input crs=source.crs,
schema=input.schema schema=output_schema) as output:
# read the input file
for multi in inputsource:
# extract each Polygon feature
for poly in shape(multi['geometry']):
# write the Polygon feature
output.write({
'properties': multi['properties'],
'geometry': mapping(poly)
})