Various different filtering tasks are commonly applied to LiDAR datasets (filtering by point density, low pass, vegetation filtering, smoothing-tasks and so on). As you are asking for a spatial operation (involving a shapefile), I assume you look for a way to clip your dataset, i.e. exclude points that are outside of polygon boundaries defined by a shapefile.
Generally, LAStools is a powerful package for point data processing. It is a set of command-line tools, but also brings a simple GUI and integrates with QGIS (and ArcGIS, by the way). You can freely download and evaluate the toolbox - however, only parts of it are open source (LGPL 2.1 licence) - the closed-source parts require licensing depending on your purpose. You have to check what conditions apply for you.
Use lasclip from LASTools (closed-source, check licensing)
One of the closed-source tools, lasclip, exactly performs a clip-by-shapefile task:
lasclip: takes as input a LAS/LAZ/TXT file and a SHP/TXT file with one
or many polygons (e.g. building footprints), clips away all the
points that fall outside all polygons (or inside some polygons),
and stores the surviving points to the output LAS/LAZ/TXT file.
Usage is straightforward:
lasclip -i input_file.las -poly polygons.shp -o output_file.las -verbose
(check the lasclip README for further details upon usage, more examples and shapefile requirements)
Use las2las from LASTools (open-source; basic clipping tasks only)
If closed-source software is not an option: the las2las tool can perform simple clipping tasks as well - however, you cannot clip to a shapefile-defined polygon.
You can clip by rectangles, circles, elevation, scan angle, classification or data quality for example. (See its README for usage examples and details.)
Unfortunately, I am not aware of any open-source tool which equals the lasclip functionality.
Use libLAS to access LAS files in a self-made script
LASTools are based on the open-source, BSD-licensed libLAS library. You could use libLAS to access your LAS files and filter them with a custom script, e.g. using Python.
Of course there are other possibilities if you change your processing flow (e.g. converting LAS to raster and clip later), but I think the most convenient way is to keep working with LAS as long as possible and perform all the filtering with the point cloud data itself.