depends on what image you are using. starting with 2.4- the controls are built in to work with your controller. If you have an older image of retropie I highly recommend updating to a newer one. it has worked for me swimmingly.
I’m using an SNES controller and all the buttons I’ve used work- one button clicks, one button skips the cut scenes, and a combination of buttons open up the menu. I am unaware of a way to reconfigure controls for Scummvm (though the libreto-scummvm core might incorporate the retroarch configs which you could probably change but I’m not sure where the developers are at in being able to incorporate that into retropie) I know there is also the potential for an on screen keyboard but that may be tedious to work with if only a few of your buttons work.
in short, outside of modifying the source code I do not know of any way to easily change scummvm configs- If you do figure something out though I would be interested to know.
I have issues with the mapping of the controller buttons on a ps3 controller. Now I decided to take a look at the sourcecode. The button layout is hardcoded there (the non libretro version). I’d made some changes to the source and recompiling is running now. Maybe this will solve my problem with the ps3 controller.