I've done this in my area before with different shops. Some will allow you to use their facilities, for a fee so you can teach out of there, pool, rental gear, etc. You'll have to buy student materials for the students if teaching PADi and its not a PADI shop. If the shop wants to buy into PADI and I forget what the basic cost is, then they can order stuff for you, run the certs through them if you want, etc. There is no problem with either agency, you could teach both if you want at this level.
Here are a couple potential problems you may face. If you are working as an independent and start selling your classes and taking away students from them, they will get pissed about it. This may be no fault of your own, just good marketing and teaching could make this happen. Most dive shop owners I've met have zero business background and are not very good at business. Yeah, I know I'll hear some flack about this comment but that's my experience and opinion. No disrespect to those with business degrees or whatever.
Here is another potential issue and I'm trying to think about how to articulate this next one. If they decide they want to sell PADI too, buy into it and then you're teaching there and they are not used to PADI standards or selling PADI courses there could be some conflict between you and them. Example, they are used to doing brand X, taking a certain amount of time in the pool, which they are paying for and you come along basically working for them now teaching PADI and following those standards and you need more pool time than they would teaching brand X. They don't want to pay for extra time and there is a conflict. Think about this one for a minute...
Another one related is how long it may take over all to do a PADI course vs brand X. My experience is more time, so the course should cost more than the brand X course, right? The shop owner has to figure out how to charge for the PADI course, it becomes more difficult for him/her so eventually they begin to steer students away from PADI and into brand X, which you may or may not be teaching. See any problems with this?
You're a private contractor, much like most of the rest of us, even if on the boards teaching for a particular shop. However, you still have to follow the "rules" of the shop and the shop owners desires if you want to teach there.
The easiest path is to rent from the shop the pool, classroom space, gear and add that into the cost of teaching on your own.
Myself I'm trying to explore the idea of a collective. A few instructors get together and pool resources to have a place, pool, gear, etc., and indepently do their own thing. This is seemingly a difficult task as well so far.
Good luck, think about what you really want to do and get things in writing so there is a clear understanding regardless of the path you take.