I don't really recommend this because there is not much benefit to get from the approach as desired by the O.P.
The command \example is defined already as soon the example environment has been declared with \newtheorem, as is \endexample in order to mark the end of the example and doing some 'clean-up' for the end of the environment.
\renewcommand{\example} is basically no problem as long as \example does not appear again inside the redefined \example environment, otherwise it will end in an recursive definition, finally exceeding TeX's memory.
A solution is to save the old definition of \example and \endexamples and use those in an redefinition of \example, together with an extra\begingroup...\endgroup pair in order to prevent the leaking of font etc. changes outside, which has been the case by using \example only as reported by the O.P.
The \foo count stuff is included only in order to show that the group feature is maintained and does not leak outside.
\documentclass{article} \usepackage{amsthm} \newtheorem{example}{Example} \newtheorem{exampleorig}{Example} \let\origexample\example \let\origendexample\endexample \newcount\foo \renewcommand{\example}[1]{\begingroup\origexample#1\origendexample\endgroup} \begin{document} The value of foo is \the\foo \example{% Here is an example for the Pythagorean theorem: \foo=18% \[ c^{2} = a^{2} + b^{2} \] } The new value of foo is \the\foo \begin{exampleorig} Here is an example for the Pythagorean theorem: \[ c^{2} = a^{2} + b^{2} \] \end{exampleorig} \end{document}

example, you cannot also have a command\examplebecause an environment already defines a command by the same name. But the redefinition you show makes no sense anyway. Why would you not use\begin{example} whatever \end{example}? There is nothing to be gained from the proposed command that would in any way affect italicisation.\begin{example}...\end{example}.