If you are looking for something completely automated Shotcut is not the tool for you. Rather, perhaps you want to write something that uses its engine MLT. Shotcut is by design an interactive manual tool. But the below can help a lot if you do not already know about it.
Also, you can launch shotcut with a command line argument of a wildcard path such as shotcut ~/Pictures/*
and it will load them into the Playlist view for you. After that it is a few short steps to use the slideshow generator, add an audio track, add the music, and export.