Payday loan companies may have millions of customers, who all borrow hundreds or thousands of dollars for a fee. Do these companies get their funds from banks and share the interest together, or what?
Payday loan companies basically are banks (although they are incredibly terrible ones).
Banks make money in two ways:
(1) They charge fees for services they provide (bank account fees, etc.); and
(2) The interest rate differential: They borrow money from individuals and corporations (your savings account is essentially money you are loaning to the bank) for a small % paid to individuals, and then lend that money back to other people for a higher %. ie: You might earn 0.5% on your savings account, but then the bank takes that money and lends it to your neighbor for 2.5% as part of their mortgage.
Payday loan companies make money in one way:
They charge an enormous markup on money lent out to other people. The rates in some cases are so high (annualized interest rates of >1000% are not uncommon in countries without full regulation of this industry), that it barely matters where they get money from. They might get money from investors [who bought shares in the company, giving the company initial cash in the hope that they give dividends down the road], they might get money from other 'real' banks [who lend money just like they would lend money to any other business, with a regular interest rate], or they might have many from many other sources. They might even issue their debt publically, so that individuals could buy bonds from the company and receive a small amount of interest every year.
The point is that the rates of return on the money leant by payday loan companies are so high, that the cost of where the money comes from is not terribly relevant.