It functions like any other contraband if you are not inspected. However, if you are inspected, then you only get the special effect if all of the other goods in your bag are the type you declared, otherwise you must discard it as contraband. The Sheriff will only pay the Frequently Asked Questions penalty on the items actually in the bag and the eight gold extra from Royal Summons. If otherwise telling the truth, as in all of your goods other than Royal Summons are the goods you declared, then even if inspected Royal Summons will be placed in your contraband pile. It would only ever be discarded upon inspection if you were lying about the remaining contents of your bag.