We consider a radar architecture where an illuminator composed of few sources is used as a feeder for a (passive) reconfigurable intelligent surface (RIS), so as to mimic the behavior of a multiple-input multiple-output (MIMO) radar composed of as many active elements as the RIS. In this framework, we study the problem of beampattern design in the space-frequency domain, and we propose to choose the source signals and the RIS adjustable phases in order to minimize the weighted squared error between the desired (amplitude) beampattern and the synthesized one. A low complexity iterative algorithm is proposed to solve the resulting non-convex least square problem. An example is provided to show the merits of the proposed approach.