With the showOpenDialog you can open files or folders. To show an open dialog all you need to do is:
the showOpenDialog returns an array of strings with the paths chosen by the user. If you instead decide to use the callback method it will return
There are more options to showOpenDialog to use. Take a look at the docs to se what the options are.
In the electron-tutorial-app this code is used to display a showOpenDialog. It also uses ipc to communicate between the main and renderer process:
As you can see above some ipc-stuff is used. Take a look at the dialog.js to see how the message is sent and how the response is handled.