How can I fire a remote when a dev product is purchased?

The tutorials that I have found do not answer this question. Help would be appreciated, thanks.

is this what you are looking for?

local remote = game.ReplicatedStorage:WaitForChild("RemoteEvent") -- change that to your event location 
local marketPlace = game:GetService("MarketplaceService")

local productId = 0 -- change to your own productId

marketPlace.ProcessReceipt = function(r)
	local plr = game.Players:GetPlayerByUserId(r.PlayerId)
	if r.ProductId==productId then
		remote:FireClient(plr)
	end
	return Enum.ProductPurchaseDecision.PurchaseGranted
end