This question has been posted several times in this forum. Yes you can do it. But you need a server-roundtrip for this. JavaScript doesn't allow the direct access to your local drive, due to security restrictions. JS runs in a webbrowser who shouldn't access your local filesystem automatically. Therefore it is not possible with the JS-API alone.
You have to upload your shapefile via HTML mechanisms to a server-component, like the code-behind of an ASPX-page. You can parse your shapefile transform it for example to a JSON format (for example a FeatureSet) and send the results back to the client with a callback. The client can draw the results directly on the GraphicsLayer.
HTH.
Axel