Use this expression in your Visualforce page to access a message channel and use the Lightning Message Service APIs.
<apex:page > <script> // Load the MessageChannel token in a variable var SAMPLEMC = "{!$MessageChannel.SampleMessageChannel__c}"; function handleClick() { const payload = { recordId: "some string", recordData: {value: "some value"} } sforce.one.publish(SAMPLEMC, payload); } </script> <div> <p>Publish SampleMessageChannel</p> <button onclick="handleClick()">Publish</button> </div> </apex:page>