I'm trying to make a footprint for an RF shield. I made a footprint just putting few pads in square shape but the problem is that the Altium report me a "component clearance" violation. How can I solve that?
You can add a very simple extruded 3D body to the footprint:
Place -> 3D Body:
Then click okay and draw the outline of your shield.
And then you make sure there's no 2D keepout on any of the keepout layers, being "Keepout" and any of the applicable mechanical layers. PCB Layer Standards on this page is helpful.
It will then use the 3D "cap" you added to check whether everything fits neatly under the cap, unless you change those rules. If it's a shield that touches the board you may want to add a line to the top layer and make that a "Keepout Line". Double click the line and in the properties check "Keepout":
If you want continuous ground under the cap's edge, which is equally sensible, you can of course add areas or lines connected to the pads, which will also prevent routing, but possibly not components.
Or if you're fine routing lines under the edge over the top (I wouldn't be, not in general at least), you can add a line on a component placement layer instead just to avoid anything ending up there that the cap will cut through.
You can alternatively make an exception, but then you are free to place too high components under the shield. If you do it like above, it will warn you with an error if you try to place a 5mm capacitor under a 3mm high shield. The margin for that can be found in the Design Rules -> Manufacturing section.
I don't know if you can prevent that error message. However, DRC errors are really just warnings to the user, and do not prevent generating the PCB artwork and drill files.
It is desirable to have no ERC or DRC errors, but sometimes there are things you want to do, and know are OK, but produce error messages that are hard or impossible to avoid. This may be one of those...