having believed—except one who is compelled while his heart remains firm in faith—but whoever opens his heart to disbelief”—to the end of the verse.
The meaning of the verse—and Allah knows best—is that whoever outwardly manifests disbelief is a disbeliever, unless he is coerced while his heart remains firm in faith.
As for prostration before an idol where neither verbal nor circumstantial indications establish that it is directed to the idol: whoever outwardly presents himself as prostrating to the idol, or where the indications establish this, is a disbeliever, even if he intends to prostrate to Allah, unless he is coerced, as explained above.
As for prostrating to Allah before an idol without any evidence indicating that the prostration is directed to the idol, this is forbidden because it involves imitating the polytheists. If it occurs out of fear of them, it is pardoned because of that excuse; the person is excused on grounds of interpretation. Nevertheless, it is not permissible to adopt this as a means of calling people to Allah, for something that is itself forbidden cannot be included among the means of calling people to Him. What Allah has permitted and prescribed amply suffices without recourse to what He has forbidden, as stated in the hadith:
“Allah has not placed your healing in what He has forbidden you.” (1)