Injecting module in load time

I need an option to download and load module if it’s mentioned in play configuration. Is it possible? Any references are appreciated.