Can I intern at my own company? So I founded a company as a PhD student and I want to work on company products over the summer times. Do I take a leave of absence or can I take an internship at my own company during that time?
What's the right way to do this?
can I take an internship at my own company during that time?

As a matter of pure semantics, I think the answer is that you cannot logically intern at your own company, in the sense that being a founder, owner, and regular employee (let alone CEO or some other high-level function which presumably you have) of a company is a distinct status from that of an intern. So being an intern at your own company is simply a notion that doesn’t make sense.
However, this seems to be just a matter of how you phrased the question. What you really seem to be asking is a slightly different question, which is, if I’m understanding correctly:

will working over the summer months at your company satisfy your school’s requirement that students in the program you’re enrolled at do research or an internship over the summer?

The answer to that is:

Only your school can say for sure. You’ll have to ask them. But also,

I think it’s very likely that the answer will be yes, at least if your school is reasonable and your company can be convincingly shown to be doing interesting things that are related to the kind of research your program wants students to be doing.



What's the right way to do this?

Explain the situation to the people at your school and ask them whether they would approve for you to keep working at your company over the summer months in lieu of the usual internship/research requirement. Be prepared to explain what kind of work you’ll be doing and to provide evidence that the company is a real company working on real things. It might be helpful if you have other people who are involved and can attest to the nature of the venture, such as a co-founder or investors, since trying to convince people based on your word alone might come across as a bit sketchy, at least if the venture is new and still hasn’t produced anything substantial.
Good luck!