[subject] + 非 + [verb phrase] + 不可 / 不行
[subject] + 非要 / 非得 + [verb phrase] + (不可)
非…不可 says something must happen: there's no other way, or someone insists on it. The verb phrase sits between 非 and 不可. It works in speech and writing alike.
With a situation or a task in view, it means there's no alternative.
With a person as the subject and 要 after 非, it describes someone set on doing something, often against advice.
About an outcome, usually a bad one, 非…不可 means "bound to".
不可 closes the pattern; it doesn't go in front of the verb. In speech it can be dropped after 非要 or 非得, but after plain 非 keep it.
不行 or 不成 can replace 不可 in speech. 非得…不可 has its own entry.