The design of Reconfigurable Intelligent Surfaces (RISs) is typically based on treating the RIS as an infinitely large surface that steers incident plane waves toward the desired direction. In practical implementations, however, the RIS has finite size and the incident wave is a beam of finite $k$-content, rather than a plane wave of $\delta$-like $k$-content. To understand the implications of the finite extent of both the RIS and the incident beam, here we treat the RIS as a spatial filter, the transfer function of which is determined by both the prescribed RIS operation and the shape of the RIS boundary. Following this approach, we study how the RIS transforms the incident $k$-content and we demonstrate how, by engineering the RIS shape, size, and response, it is possible to shape beams with nontrivial $k$-content to suppress unwanted interference, while concentrating the reflected power to desired directions. We also demonstrate how our framework, when applied in the context of near-field communications, provides the necessary insights into how the wavefront of the beam is tailored to enable focusing, propagation with invariant profile, and bending, beyond conventional beamforming.