Let $A$ be an associative algebra, $M$ a right $A$-module. Suppose we are given an $A$-module homomorphism $M \to A$. Then we can make $M$ itself into an associative algebra via the multiplication $$ M \otimes M \to M \otimes A \to M.$$ The same construction works if $A$ and $M$ are cochain complexes, ie when $A$ is a dg algebra. In this case one can moreover prove that the construction is well defined on the level of the derived category: if $f,g \colon M \to A$ are chain maps that are equal in the derived category, then the resulting dg-algebra structures on $M$ are quasi-isomorphic.
This seems like a natural enough construction that it has been studied before. Does it have a name? Is there a reference in the literature to the claim that this is well defined in the derived category?