Include custom framework

Hi to all,
just to undestand how and where i can make an inclusion for my custom script.

I need to populate some custom dropdown with records on my external mysql table.

I’ve create a function based on eggsurplus article:
but in my case the records resides in same mysql instance but different database.

So i would like to inlude a medoo framework in order to speedup the process.

but not in custom function itself otherwise we could have a recursive inclusion (maybe required_once could solve).

Anyway, is there any official or better way to do that?

Thank you