Check out these docs to connect your SDK to Fuels testnet here.
To deploy a contract to the testnet, you'll need to create a wallet using
forc-wallet and then run the following command:
forc deploy --url https://node-beta-1.fuel.network/graphql --gas-price 1
Check out the Developer Quickstart to see a working example of how to deploy a contract to testnet.