A two-fluid model is established to study the effect of injection on the structure of cosmic-ray-modified shocks. The model comprises a thermal plasma and cosmic rays. The cosmic rays are considered to be a massless fluid with significant pressure. Its behaviour is governed by the cosmic-ray energy equation, which can be derived from the transport equation. A term in the equation responsible for injection is proportional to the negative divergence of the plasma velocity The rest of the dependence has to be introduced phenomenologically. It is expected that the injection of cosmic rays increases if the thermal plasma energy density increases. To fix ideas, we assume that the injection is linear in the thermal pressure. By suitable redefinition of some quantities, this model can formally be recast into a model without injection, i.e. the injection is 'transformed' away mathematically Hence the results are similar to those for the modified shocks without injection. Nonetheless, there are differences. The system with injection prefers a smooth shock transition. The reason is that the injection softens the equation of state of the plasma, and induces an extra cosmic-ray partial pressure. The dependence of the efficiency of shock acceleration on the injection is also discussed.