@kkokkinos There are a few GPIO based controller drivers available in RetroPie:
https://retropie.org.uk/docs/GPIO-Modules/ https://github.com/recalbox/mk_arcade_joystick_rpiI think you're trying to use the mk_arcade_joystick_rpi one ? If so, then you need to install it first from the RetroPie-Setup script (it's in the drivers section of the packages) and then configure it - as described on the Github page of the driver. You can ignore all the installation steps and just look at the pinout and make sure you connected the wires correctly, then jump to the Loading the driver section.
There is no recalbox.conf file in RetroPie, that is part of the Recalbox image -a different project.