I have a question regarding GE modelling. The firm's problem is to: $$ \max\pi=pf(k,l)-wl-rk $$
If this is true, we choose $l$ and $k$ to maximize the difference between costs and revenues. This yields the familiar FONCs for $l$ and $k.$ However, in equilibrim, we set the profits equal to 0.
My intuition tells me that after we solve the above problem, the equilibrium condition implies our selecting a price $p$ such that $\pi$ equal $0$ in equilibrium. Is this correct?