@wawa Assuming the core's source code is hosted on Github, all you'd need to is make a scriptmodule for it, test it to verify it works, and then submit a pull request to the RetroPie-Setup Github repo.
Thankfully, for libretro cores, there are tons of scriptmodules you can use as a reference to write your own; just take a peek in /home/pi/RetroPie-Setup/scriptmodules/. Assuming you know how to write a .sh file that complies with this style guide (and know how to use Github's pull requests), you should be good to go!