We study the effective linear and nonlinear optical parameters of composites containing noble metal nanoparticles and their dependence on the shape and size of the particles. Our numerical approach is based on the effective medium approximation combined with discrete dipole approximation, which results in a fast and accurate numerical method. The results demonstrate the possibility to achieve large enhancements of the linear and nonlinear optical parameters by tuning the plasmon resonance to a desired frequency by changing the size and the shape of the nanoparticles.