Export from PostGIS to SpatiaLite?

If you want to select from a postgis table, you can use this statement:

ogr2ogr -f SQLite -dsco SPATIALITE=yes C:/temp/myfile2.sqlite PG:"host=HOSTNAMEORIP port=XXXX dbname=YOURDB user=YOURUSER password=YOURPASSWORD" -sql "select * from mypostgislayer"

If you want to export the whole postgis table, you can use this statement:

ogr2ogr -f SQLite -dsco SPATIALITE=yes C:/temp/myfile.sqlite PG:"host=HOSTNAMEORIP port=XXXX dbname=YOURDB user=YOURUSER password=YOURPASSWORD" "mypostgislayer"

For further information see the following links: ogr2ogr and spatialite.