This can be easily done with geoprocessing tools. I used arcpy to build a custom GP tool that would take feature set and the output shapefile location and copy features to it.
features = arcpy.GetParameterAsText(0) #featureSet outFeatureClass = arcpy.GetParameterAsText(1) # Shapefile path # Set local variables arcpy.CopyFeatures_management(features, outFeatureClass)
This gpk can be accessed from local or be hosted on your ArcGIS online account.
You might have to handle creating the feature set properly in the runtime app.