Assuming the stock price evolves according to geometric Brownian motion, the solution of the Black and Scholes PDE for general pay-off $F(S)$ gives us the value at time $t$ of a European derivative $V(S,t)$ paying off $F(S_T)$
$$V(S,t) = e^{-r(T-t)} \int_{-\infty}^\infty F \biggl( \; S_t e^{(r-\sigma^2/2)(T-t) \; – \; \sigma \sqrt{T-t}\;z } \biggr) \; e^{-z^2/2} \dfrac{dz}{\sqrt{2\pi}}$$