Create a provider that uses Stellar

I’m trying to create a provider that uses the SDK in javascript that makes Stellar available ( My question is what would be the correct way to use the SDK, I mean how to do the import, whether to use it as javascript (outside the StellarProvider class) or inside, in this case I do not even know how to do it.
Being an evaluated project I have to program in the most correct way.