We consider a continuous-time model in which an insurer proposes an insurance contract to a potential insured. Motivated by climate change and catastrophic events, we assume that the number of claims process is a shot-noise Cox process. The insurer selects the premium to be paid by the potential insured and the amount to be paid for each claim. In addition, the insurer can request some actions from the potential insured to reduce the number of claims. The insurer wants to maximize his expected total utility, while the potential insured signs the contract if his expected total utility for signing the contract is greater than or equal to his expected total utility when he does not sign the contract. We obtain an analytical solution for the optimal premium, the optimal amount to be paid for each claim, and the optimal actions of the insured. This leads to interesting managerial insights.