Congratulations on the opportunity...! I've seen situations like this from the other side, working for a big ERP vendor.
To try to answer your questions out of order:
How to structure? Based on the info provided, the simplest thing would actually be no specific arrangement at all. Lots of ERP add-ons are sold to ERP customers without being "contracted" by the vendor. However, if they want to work with you directly then a contract (not a joint venture or anything else) is the best place to start.
A contract ensures all factors are on the table such as your investment to provide the integrated product, and so on. Is the arrangement month-to-month or for several years? Is there any guaranteed volume, or is it just "best efforts". And so on.
What's realistic? Again, for two companies that don't really know each other and with a size differential, you're unlikely to get anything you'll like other than a contract. The exception is if they see you as extremely strategic to their future, in which case you might swing an acquisition -- if you actually want to lose control in exchange for equity in their company.
What key factors? It's hard to say without knowing more. I'd say stick to a simple contract unless an outright acquisition is likely. Make sure you don't put too much in up front without a reasonable guarantee of return; a bigger company can easily change direction six months from now and leave you hanging. As soon as you have one customer in common, you'll be stuck to this other company for years, so play fair! If they are not good partners, consider walking away. ERP has a very long lifespan.
I'm not sure what you feel you might lose control over (you think they might copy your product?) but if you negotiate a reasonable contract, you shouldn't have too much exposure.
Hopefully this is useful; there are a lot of issues that will be specific to your exact situation.