We discuss the design and implementation of derivative-free methods for optimization of functions with embedded Monte Carlo simulations. By this we mean that the computation of the function and/or the testing for feasibility depends on a Monte Carlo simulation. Under the assumption that the optimization can control the number of Monte Carlo trials, we prove a probability-one asymptotic convergence result, which provides guidance to a practical implementation. We illustrate the ideas with an application to water resources policy.