"Loophole" would be the proper spelling. also clues you to the definition. here's the precise definition you're looking for:
"A way of escaping a difficulty, especially an omission or ambiguity in the wording of a contract or law that provides a means of evading compliance."
to further describe in my own words as i greatly prefer: it's THE way around the rules itself. not the act, not the thought, but the hole that lets you through unscathed.