Becoming partner in business that has interest based loan.Taking out interest based loan

Asalaam alaikum. I was offered by a small engineering company 50% shares. The company makes $5 million annually but has cash flow through a credit line and has $2 million in bank loans. If I join, I will also be part of the loan liability. Since Islamic banks dont give business loans, how can I write the contract with them so its still halal for me?