Two separate approaches I would take:
1 - Write your own web service to parse a shapefile and return it as a JSON representation. I would write the web service in .NET as I am most familiar with it. Use a .NET ShapeFile library to parse the uploaded shapefile (you'll probably want to take ESRI's approach and upload everything as a zip file, instead of uploading multiple files to cover the shp/prj/shx/dbf). Once you have the shapefile parsed, you'll need to write out the geometries and attributes as JSON. To make your life easier on client-side, format the JSON as a ArcGIS JS API FeatureCollection. That way when you have the returned data in JS, you don't need to write yet another parse method to convert it to a FeatureCollection. Finally, add the returned FeatureCollection to a graphics layer in your JS API map.
The downside to this approach is that you have to write server code, and you have to run the service on your own server. You'll also be limited to how many features you can parse and return, as the browser will not appreciate being sent 1000s of geometries to display in the graphics layer.
2 - try to reverse engineer ESRI's JS code to figure out how they upload the zip file to their server, and afterwards how they retrieve it. You should be able to do the upload easily enough, which should add the data to your ArcGIS Online map. I'm not certain about the second part though. If you're NOT using an ArcGIS Online map however, this is certainly not the way to go.
http://www.arcgis.com/home/js/esri/arcgisonline.js is the file you want to examine. Run the file through JS Beautifier, and look for the following 'class':
As you can see, they upload the zip file by using
dojo.io.iframe.send after which ESRI's servers parse the file and add it to ArcGIS Online.
The drawback with this method is that you may spend a long time and still come to a dead end. Benefit is that you don't need to write or run server-side code.
There are other approaches, such as uploading the shapefile and adding it an existing map service in ArcGIS server, but those are more complex.